Skip to content

fix: set env var for making request to coprocessor sidecar #954

fix: set env var for making request to coprocessor sidecar

fix: set env var for making request to coprocessor sidecar #954

Workflow file for this run

name: Client API
on:
pull_request:
paths:
- 'infrastructure/client-api/**'
- 'packages/**'
- 'docker-compose.yml'
- 'servers/client-api/**'
- 'pnpm-lock.yaml'
- '.github/actions/**'
- '.github/workflows/client-api.yml'
- '.github/workflows/reuse-*.yml'
- 'servers/coprocessor/**'
push:
branches:
- main
- dev
paths:
- 'infrastructure/client-api/**'
- 'packages/**'
- 'servers/client-api/**'
- 'pnpm-lock.yaml'
- '.github/actions/**'
- '.github/workflows/client-api.yml'
- '.github/workflows/reuse-*.yml'
- 'servers/coprocessor/**'
jobs:
infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: '@infrastructure/client-api'
stack-output-path: infrastructure/client-api/cdktf.out/stacks/client-api
secrets: inherit
coprocessor:
uses: ./.github/workflows/reuse-build-and-push-image.yml
needs: [infrastructure]
with:
scope: '@server/coprocessor'
docker-repo-name-pattern: clientapi-{0}-coprocessor
app-path: servers/coprocessor
# Do not pass terraform-output because we don't want to redo codedeploy
# and it's conditional on this output
secrets: inherit
api:
uses: ./.github/workflows/reuse-build-and-push-image.yml
# Require coprocessor dependency because we need the image to
# be built and pushed prior to codedeploy
needs: [infrastructure, coprocessor]
with:
scope: '@server/client-api'
docker-repo-name-pattern: clientapi-{0}-app
context: servers/client-api
app-path: servers/client-api
terraform-output: ${{needs.infrastructure.outputs.terraform-output}}
secrets: inherit