From e3678561454e16f9f01bc3ca99d0c85b4992af4e Mon Sep 17 00:00:00 2001 From: Yossi Tamari Date: Sun, 11 Feb 2024 14:18:14 -0800 Subject: [PATCH 1/6] chore: refactored ci/cd into templated build workflow --- .github/workflows/build-auth-server.yml | 32 ++++++++ .github/workflows/build-ess-backend.yml | 34 +++++++++ .github/workflows/build-landing-page.yml | 32 ++++++++ .../workflows/build-registrants-portal.yml | 52 +++++++++++++ .github/workflows/build-responders-portal.yml | 51 +++++++++++++ .github/workflows/build-suppliers-portal.yml | 50 +++++++++++++ .github/workflows/build-template.yml | 71 ++++++++++++++++++ .github/workflows/cd-ess-backend.yml | 74 ------------------- .github/workflows/cd-landing-page.yml | 73 ------------------ .github/workflows/cd-oauth-server.yml | 74 ------------------- .../workflows/cd-registrants-portal-api.yml | 74 ------------------- .../workflows/cd-registrants-portal-ui.yml | 73 ------------------ .../workflows/cd-responders-portal-api.yml | 74 ------------------- .github/workflows/cd-responders-portal-ui.yml | 73 ------------------ .github/workflows/cd-suppliers-portal-api.yml | 73 ------------------ .github/workflows/cd-suppliers-portal-ui.yml | 73 ------------------ .github/workflows/ci-ess-backend.yml | 27 ------- .github/workflows/ci-landing-page.yml | 26 ------- .github/workflows/ci-oauth-server.yml | 26 ------- .../workflows/ci-registrants-portal-api.yml | 27 ------- .../workflows/ci-registrants-portal-ui.yml | 26 ------- .../workflows/ci-responders-portal-api.yml | 27 ------- .github/workflows/ci-responders-portal-ui.yml | 26 ------- .github/workflows/ci-suppliers-portal-api.yml | 26 ------- .github/workflows/ci-suppliers-portal-ui.yml | 26 ------- 25 files changed, 322 insertions(+), 898 deletions(-) create mode 100644 .github/workflows/build-auth-server.yml create mode 100644 .github/workflows/build-ess-backend.yml create mode 100644 .github/workflows/build-landing-page.yml create mode 100644 .github/workflows/build-registrants-portal.yml create mode 100644 .github/workflows/build-responders-portal.yml create mode 100644 .github/workflows/build-suppliers-portal.yml create mode 100644 .github/workflows/build-template.yml delete mode 100644 .github/workflows/cd-ess-backend.yml delete mode 100644 .github/workflows/cd-landing-page.yml delete mode 100644 .github/workflows/cd-oauth-server.yml delete mode 100644 .github/workflows/cd-registrants-portal-api.yml delete mode 100644 .github/workflows/cd-registrants-portal-ui.yml delete mode 100644 .github/workflows/cd-responders-portal-api.yml delete mode 100644 .github/workflows/cd-responders-portal-ui.yml delete mode 100644 .github/workflows/cd-suppliers-portal-api.yml delete mode 100644 .github/workflows/cd-suppliers-portal-ui.yml delete mode 100644 .github/workflows/ci-ess-backend.yml delete mode 100644 .github/workflows/ci-landing-page.yml delete mode 100644 .github/workflows/ci-oauth-server.yml delete mode 100644 .github/workflows/ci-registrants-portal-api.yml delete mode 100644 .github/workflows/ci-registrants-portal-ui.yml delete mode 100644 .github/workflows/ci-responders-portal-api.yml delete mode 100644 .github/workflows/ci-responders-portal-ui.yml delete mode 100644 .github/workflows/ci-suppliers-portal-api.yml delete mode 100644 .github/workflows/ci-suppliers-portal-ui.yml diff --git a/.github/workflows/build-auth-server.yml b/.github/workflows/build-auth-server.yml new file mode 100644 index 000000000..57a6cd4ee --- /dev/null +++ b/.github/workflows/build-auth-server.yml @@ -0,0 +1,32 @@ +name: oauth-server Build +on: + push: + branches: + - master + - 'release/**' + paths: + - "oauth-server/src/API/**" + - .github/workflows/build-oauth-server.yml + - .github/workflows/build-template.yml + + pull_request: + paths: + - "oauth-server/src/API/**" + - .github/workflows/build-oauth-server.yml + - .github/workflows/build-template.yml + +jobs: + build: + permissions: + contents: read + packages: write + id-token: write + uses: ./.github/workflows/build-template.yml + with: + IMAGE_CONTEXT: src + IMAGE_FILE: oauth-server/src/API/Dockerfile + IMAGE_NAME: oauth-server + REGISTRY: ${{ vars.DOCKER_REGISTRY }} + secrets: + REGISTRY_USER: ${{ secrets.DOCKER_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.github/workflows/build-ess-backend.yml b/.github/workflows/build-ess-backend.yml new file mode 100644 index 000000000..c56178043 --- /dev/null +++ b/.github/workflows/build-ess-backend.yml @@ -0,0 +1,34 @@ +name: ess-backend Build +on: + push: + branches: + - master + - 'release/**' + paths: + - "ess/src/API/**" + - "shared/src/**" + - .github/workflows/build-ess-backend.yml + - .github/workflows/build-template.yml + + pull_request: + paths: + - "ess/src/API/**" + - "shared/src/**" + - .github/workflows/build-ess-backend.yml + - .github/workflows/build-template.yml + +jobs: + build: + permissions: + contents: read + packages: write + id-token: write + uses: ./.github/workflows/build-template.yml + with: + IMAGE_CONTEXT: src + IMAGE_FILE: ess/src/API/Dockerfile + IMAGE_NAME: ess-backend + REGISTRY: ${{ vars.DOCKER_REGISTRY }} + secrets: + REGISTRY_USER: ${{ secrets.DOCKER_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.github/workflows/build-landing-page.yml b/.github/workflows/build-landing-page.yml new file mode 100644 index 000000000..297a0780d --- /dev/null +++ b/.github/workflows/build-landing-page.yml @@ -0,0 +1,32 @@ +name: landing-page Build +on: + push: + branches: + - master + - 'release/**' + paths: + - "landing-page/src/**" + - .github/workflows/build-landing-page.yml + - .github/workflows/build-template.yml + + pull_request: + paths: + - "landing-page/src/**" + - .github/workflows/build-landing-page.yml + - .github/workflows/build-template.yml + +jobs: + build: + permissions: + contents: read + packages: write + id-token: write + uses: ./.github/workflows/build-template.yml + with: + IMAGE_CONTEXT: src + IMAGE_FILE: landing-page/src/Dockerfile + IMAGE_NAME: landing-page + REGISTRY: ${{ vars.DOCKER_REGISTRY }} + secrets: + REGISTRY_USER: ${{ secrets.DOCKER_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.github/workflows/build-registrants-portal.yml b/.github/workflows/build-registrants-portal.yml new file mode 100644 index 000000000..6aafd37ca --- /dev/null +++ b/.github/workflows/build-registrants-portal.yml @@ -0,0 +1,52 @@ +name: registrant-portal-api Build +on: + push: + branches: + - master + - 'release/**' + paths: + - "registrants/src/API/**" + - "registrants/src/UI/**" + - "shared/src/**" + - .github/workflows/build-registrants-portal.yml + - .github/workflows/build-template.yml + + pull_request: + paths: + - "registrants/src/API/**" + - "registrants/src/UI/**" + - "shared/src/**" + - .github/workflows/build-registrants-portal.yml + - .github/workflows/build-template.yml + +jobs: + build-api: + permissions: + contents: read + packages: write + id-token: write + uses: ./.github/workflows/build-template.yml + with: + IMAGE_CONTEXT: src + IMAGE_FILE: registrants/src/API/Dockerfile + IMAGE_NAME: registrants-portal-api + REGISTRY: ${{ vars.DOCKER_REGISTRY }} + secrets: + REGISTRY_USER: ${{ secrets.DOCKER_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + + build-ui: + permissions: + contents: read + packages: write + id-token: write + uses: ./.github/workflows/build-template.yml + with: + IMAGE_CONTEXT: src + IMAGE_FILE: registrants/src/UI/Dockerfile + IMAGE_NAME: registrants-portal-ui + REGISTRY: ${{ vars.DOCKER_REGISTRY }} + secrets: + REGISTRY_USER: ${{ secrets.DOCKER_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + \ No newline at end of file diff --git a/.github/workflows/build-responders-portal.yml b/.github/workflows/build-responders-portal.yml new file mode 100644 index 000000000..61ac2d206 --- /dev/null +++ b/.github/workflows/build-responders-portal.yml @@ -0,0 +1,51 @@ +name: responders-portal-api Build +on: + push: + branches: + - master + - 'release/**' + paths: + - "responders/src/API/**" + - "responders/src/UI/**" + - "shared/src/**" + - .github/workflows/build-responders-portal.yml + - .github/workflows/build-template.yml + + pull_request: + paths: + - "responders/src/API/**" + - "responders/src/UI/**" + - "shared/src/**" + - .github/workflows/build-responders-portal.yml + - .github/workflows/build-template.yml + +jobs: + build-api: + permissions: + contents: read + packages: write + id-token: write + uses: ./.github/workflows/build-template.yml + with: + IMAGE_CONTEXT: src + IMAGE_FILE: responders/src/API/Dockerfile + IMAGE_NAME: responders-portal-api + REGISTRY: ${{ vars.DOCKER_REGISTRY }} + secrets: + REGISTRY_USER: ${{ secrets.DOCKER_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + + build-ui: + permissions: + contents: read + packages: write + id-token: write + uses: ./.github/workflows/build-template.yml + with: + IMAGE_CONTEXT: src + IMAGE_FILE: responders/src/UI/Dockerfile + IMAGE_NAME: responders-portal-ui + REGISTRY: ${{ vars.DOCKER_REGISTRY }} + secrets: + REGISTRY_USER: ${{ secrets.DOCKER_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.github/workflows/build-suppliers-portal.yml b/.github/workflows/build-suppliers-portal.yml new file mode 100644 index 000000000..ce70be17c --- /dev/null +++ b/.github/workflows/build-suppliers-portal.yml @@ -0,0 +1,50 @@ +name: suppliers-portal-api Build +on: + push: + branches: + - master + - 'release/**' + paths: + - "suppliers/src/API/**" + - "suppliers/src/UI/**" + - "shared/src/**" + - .github/workflows/build-suppliers-portal.yml + - .github/workflows/build-template.yml + + pull_request: + paths: + - "suppliers/src/API/**" + - "suppliers/src/UI/**" + - "shared/src/**" + - .github/workflows/build-suppliers-portal.yml + - .github/workflows/build-template.yml + +jobs: + build-api: + permissions: + contents: read + packages: write + id-token: write + uses: ./.github/workflows/build-template.yml + with: + IMAGE_CONTEXT: src + IMAGE_FILE: suppliers/src/API/Dockerfile + IMAGE_NAME: suppliers-portal-api + REGISTRY: ${{ vars.DOCKER_REGISTRY }} + secrets: + REGISTRY_USER: ${{ secrets.DOCKER_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + build-ui: + permissions: + contents: read + packages: write + id-token: write + uses: ./.github/workflows/build-template.yml + with: + IMAGE_CONTEXT: src + IMAGE_FILE: suppliers/src/UI/Dockerfile + IMAGE_NAME: suppliers-portal-ui + REGISTRY: ${{ vars.DOCKER_REGISTRY }} + secrets: + REGISTRY_USER: ${{ secrets.DOCKER_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.github/workflows/build-template.yml b/.github/workflows/build-template.yml new file mode 100644 index 000000000..e97c6a2d9 --- /dev/null +++ b/.github/workflows/build-template.yml @@ -0,0 +1,71 @@ +name: docker-build-template + +on: + workflow_call: + inputs: + IMAGE_CONTEXT: + required: true + type: string + IMAGE_FILE: + required: true + type: string + IMAGE_NAME: + required: true + type: string + REGISTRY: + required: true + type: string + + secrets: + REGISTRY_USER: + required: true + REGISTRY_PASSWORD: + required: true + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Set up BuildKit Docker container builder to be able to build + # multi-platform images and export cache + # https://github.com/docker/setup-buildx-action + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + # Login against a Docker registry except on PR + # https://github.com/docker/login-action + - name: Log into registry ${{ inputs.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: ${{ inputs.REGISTRY }} + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + # Extract metadata (tags, labels) for Docker + # https://github.com/docker/metadata-action + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ inputs.REGISTRY }}/${{ inputs.IMAGE_NAME }} + tags: | + type=ref,event=branch + + # Build and push Docker image with Buildx (don't push on PR) + # https://github.com/docker/build-push-action + - name: Build and push Docker image + id: build-and-push + uses: docker/build-push-action@v5 + with: + context: ${{ inputs.IMAGE_CONTEXT }} + file: ${{ inputs.IMAGE_FILE }} + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + # labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/.github/workflows/cd-ess-backend.yml b/.github/workflows/cd-ess-backend.yml deleted file mode 100644 index fc59b55f2..000000000 --- a/.github/workflows/cd-ess-backend.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: cd-ess-backend - -on: - push: - branches: - - master - - paths: - - "ess/src/API/**" - - "shared/src/**" - - ".github/workflows/cd-ess-backend.yml" - -env: - IMAGE_NAME: ess-backend - WORKING_DIRECTORY: ./ess/src/API - -jobs: - build: - runs-on: ubuntu-latest - if: github.event_name == 'push' - - steps: - - uses: actions/checkout@v3 - - - uses: docker/setup-buildx-action@v2 - id: buildx - with: - install: true - - - name: Log into registry - uses: docker/login-action@v2 - with: - registry: ${{ secrets.DOCKER_REGISTRY }} - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set image repository - id: set_image_repository - run: | - # Set image repository and change all uppercase to lowercase - DOCKER_REPOSITORY=$(echo ${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }} | tr '[A-Z]' '[a-z]') - echo "::set-output name=docker-repository::$DOCKER_REPOSITORY" - - - name: Pull image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: docker pull $DOCKER_REPOSITORY:latest || true - - - name: Bump version and push tag - id: tag_version - uses: mathieudutour/github-tag-action@v6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - tag_prefix: ${{ env.IMAGE_NAME }}=v - fetch_all_tags: true - - - name: Build image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - working-directory: ${{ env.WORKING_DIRECTORY }} - run: | - VERSION=$(echo "${{ steps.tag_version.outputs.new_tag }}" | awk -F=v '{print $NF}') - - echo DOCKER_REPOSITORY=${{ env.DOCKER_REPOSITORY }} - echo VERSION=$VERSION - - tar -czh . | docker build --load --tag ${{ env.DOCKER_REPOSITORY }}:latest --cache-from=${{ env.DOCKER_REPOSITORY }}:latest --build-arg VERSION=$VERSION - - docker tag ${{ env.DOCKER_REPOSITORY }}:latest ${{ env.DOCKER_REPOSITORY }}:$VERSION - - - name: Push image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: | - docker push --all-tags ${{ env.DOCKER_REPOSITORY }} diff --git a/.github/workflows/cd-landing-page.yml b/.github/workflows/cd-landing-page.yml deleted file mode 100644 index 4e115d468..000000000 --- a/.github/workflows/cd-landing-page.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: cd-landing-page - -on: - push: - branches: - - master - - paths: - - "landing-page/src/**" - - ".github/workflows/cd-landing-page.yml" - -env: - IMAGE_NAME: landing-page - WORKING_DIRECTORY: ./landing-page/src/ - -jobs: - build: - runs-on: ubuntu-latest - if: github.event_name == 'push' - - steps: - - uses: actions/checkout@v3 - - - uses: docker/setup-buildx-action@v2 - id: buildx - with: - install: true - - - name: Log into registry - uses: docker/login-action@v2 - with: - registry: ${{ secrets.DOCKER_REGISTRY }} - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set image repository - id: set_image_repository - run: | - # Set image repository and change all uppercase to lowercase - DOCKER_REPOSITORY=$(echo ${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }} | tr '[A-Z]' '[a-z]') - echo "::set-output name=docker-repository::$DOCKER_REPOSITORY" - - - name: Pull image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: docker pull $DOCKER_REPOSITORY:latest || true - - - name: Bump version and push tag - id: tag_version - uses: mathieudutour/github-tag-action@v6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - tag_prefix: ${{ env.IMAGE_NAME }}=v - fetch_all_tags: true - - - name: Build image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - working-directory: ${{ env.WORKING_DIRECTORY }} - run: | - VERSION=$(echo "${{ steps.tag_version.outputs.new_tag }}" | awk -F=v '{print $NF}') - - echo DOCKER_REPOSITORY=${{ env.DOCKER_REPOSITORY }} - echo VERSION=$VERSION - - tar -czh . | docker build --load --tag ${{ env.DOCKER_REPOSITORY }}:latest --cache-from=${{ env.DOCKER_REPOSITORY }}:latest --build-arg VERSION=$VERSION - - docker tag ${{ env.DOCKER_REPOSITORY }}:latest ${{ env.DOCKER_REPOSITORY }}:$VERSION - - - name: Push image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: | - docker push --all-tags ${{ env.DOCKER_REPOSITORY }} \ No newline at end of file diff --git a/.github/workflows/cd-oauth-server.yml b/.github/workflows/cd-oauth-server.yml deleted file mode 100644 index 404456fc2..000000000 --- a/.github/workflows/cd-oauth-server.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: cd-oauth-server - -on: - workflow_dispatch: {} - push: - branches: - - master - - paths: - - "oauth-server/src/API/**" - - ".github/workflows/cd-oauth-server.yml" - -env: - IMAGE_NAME: oauth-server - WORKING_DIRECTORY: ./oauth-server/src/API - -jobs: - build: - runs-on: ubuntu-latest - if: github.event_name == 'push' - - steps: - - uses: actions/checkout@v3 - - - uses: docker/setup-buildx-action@v2 - id: buildx - with: - install: true - - - name: Log into registry - uses: docker/login-action@v2 - with: - registry: ${{ secrets.DOCKER_REGISTRY }} - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set image repository - id: set_image_repository - run: | - # Set image repository and change all uppercase to lowercase - DOCKER_REPOSITORY=$(echo ${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }} | tr '[A-Z]' '[a-z]') - echo "::set-output name=docker-repository::$DOCKER_REPOSITORY" - - - name: Pull image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: docker pull $DOCKER_REPOSITORY:latest || true - - - name: Bump version and push tag - id: tag_version - uses: mathieudutour/github-tag-action@v6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - tag_prefix: ${{ env.IMAGE_NAME }}=v - fetch_all_tags: true - - - name: Build image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - working-directory: ${{ env.WORKING_DIRECTORY }} - run: | - VERSION=$(echo "${{ steps.tag_version.outputs.new_tag }}" | awk -F=v '{print $NF}') - - echo DOCKER_REPOSITORY=${{ env.DOCKER_REPOSITORY }} - echo VERSION=$VERSION - - tar -czh . | docker build --load --tag ${{ env.DOCKER_REPOSITORY }}:latest --cache-from=${{ env.DOCKER_REPOSITORY }}:latest --build-arg VERSION=$VERSION - - docker tag ${{ env.DOCKER_REPOSITORY }}:latest ${{ env.DOCKER_REPOSITORY }}:$VERSION - - - name: Push image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: | - docker push --all-tags ${{ env.DOCKER_REPOSITORY }} diff --git a/.github/workflows/cd-registrants-portal-api.yml b/.github/workflows/cd-registrants-portal-api.yml deleted file mode 100644 index 979367f83..000000000 --- a/.github/workflows/cd-registrants-portal-api.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: cd-registrants-portal-api - -on: - push: - branches: - - master - - paths: - - "registrants/src/API/**" - - "shared/src/**" - - ".github/workflows/cd-registrants-portal-api.yml" - -env: - IMAGE_NAME: registrants-portal-api - WORKING_DIRECTORY: ./registrants/src/API - -jobs: - build: - runs-on: ubuntu-latest - if: github.event_name == 'push' - - steps: - - uses: actions/checkout@v3 - - - uses: docker/setup-buildx-action@v2 - id: buildx - with: - install: true - - - name: Log into registry - uses: docker/login-action@v2 - with: - registry: ${{ secrets.DOCKER_REGISTRY }} - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set image repository - id: set_image_repository - run: | - # Set image repository and change all uppercase to lowercase - DOCKER_REPOSITORY=$(echo ${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }} | tr '[A-Z]' '[a-z]') - echo "::set-output name=docker-repository::$DOCKER_REPOSITORY" - - - name: Pull image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: docker pull $DOCKER_REPOSITORY:latest || true - - - name: Bump version and push tag - id: tag_version - uses: mathieudutour/github-tag-action@v6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - tag_prefix: ${{ env.IMAGE_NAME }}=v - fetch_all_tags: true - - - name: Build image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - working-directory: ${{ env.WORKING_DIRECTORY }} - run: | - VERSION=$(echo "${{ steps.tag_version.outputs.new_tag }}" | awk -F=v '{print $NF}') - - echo DOCKER_REPOSITORY=${{ env.DOCKER_REPOSITORY }} - echo VERSION=$VERSION - - tar -czh . | docker build --load --tag ${{ env.DOCKER_REPOSITORY }}:latest --cache-from=${{ env.DOCKER_REPOSITORY }}:latest --build-arg VERSION=$VERSION - - docker tag ${{ env.DOCKER_REPOSITORY }}:latest ${{ env.DOCKER_REPOSITORY }}:$VERSION - - - name: Push image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: | - docker push --all-tags ${{ env.DOCKER_REPOSITORY }} diff --git a/.github/workflows/cd-registrants-portal-ui.yml b/.github/workflows/cd-registrants-portal-ui.yml deleted file mode 100644 index 6e12f7149..000000000 --- a/.github/workflows/cd-registrants-portal-ui.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: cd-registrants-portal-ui - -on: - push: - branches: - - master - - paths: - - "registrants/src/UI/**" - - ".github/workflows/cd-registrants-portal-ui.yml" - -env: - IMAGE_NAME: registrants-portal-ui - WORKING_DIRECTORY: ./registrants/src/UI - -jobs: - build: - runs-on: ubuntu-latest - if: github.event_name == 'push' - - steps: - - uses: actions/checkout@v3 - - - uses: docker/setup-buildx-action@v2 - id: buildx - with: - install: true - - - name: Log into registry - uses: docker/login-action@v2 - with: - registry: ${{ secrets.DOCKER_REGISTRY }} - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set image repository - id: set_image_repository - run: | - # Set image repository and change all uppercase to lowercase - DOCKER_REPOSITORY=$(echo ${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }} | tr '[A-Z]' '[a-z]') - echo "::set-output name=docker-repository::$DOCKER_REPOSITORY" - - - name: Pull image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: docker pull $DOCKER_REPOSITORY:latest || true - - - name: Bump version and push tag - id: tag_version - uses: mathieudutour/github-tag-action@v6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - tag_prefix: ${{ env.IMAGE_NAME }}=v - fetch_all_tags: true - - - name: Build image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - working-directory: ${{ env.WORKING_DIRECTORY }} - run: | - VERSION=$(echo "${{ steps.tag_version.outputs.new_tag }}" | awk -F=v '{print $NF}') - - echo DOCKER_REPOSITORY=${{ env.DOCKER_REPOSITORY }} - echo VERSION=$VERSION - - tar -czh . | docker build --load --tag ${{ env.DOCKER_REPOSITORY }}:latest --cache-from=${{ env.DOCKER_REPOSITORY }}:latest --build-arg VERSION=$VERSION - - docker tag ${{ env.DOCKER_REPOSITORY }}:latest ${{ env.DOCKER_REPOSITORY }}:$VERSION - - - name: Push image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: | - docker push --all-tags ${{ env.DOCKER_REPOSITORY }} \ No newline at end of file diff --git a/.github/workflows/cd-responders-portal-api.yml b/.github/workflows/cd-responders-portal-api.yml deleted file mode 100644 index 648bab06c..000000000 --- a/.github/workflows/cd-responders-portal-api.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: cd-responders-portal-api - -on: - push: - branches: - - master - - paths: - - "responders/src/API/**" - - "shared/src/**" - - ".github/workflows/cd-responders-portal-api.yml" - -env: - IMAGE_NAME: responders-portal-api - WORKING_DIRECTORY: ./responders/src/API - -jobs: - build: - runs-on: ubuntu-latest - if: github.event_name == 'push' - - steps: - - uses: actions/checkout@v3 - - - uses: docker/setup-buildx-action@v2 - id: buildx - with: - install: true - - - name: Log into registry - uses: docker/login-action@v2 - with: - registry: ${{ secrets.DOCKER_REGISTRY }} - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set image repository - id: set_image_repository - run: | - # Set image repository and change all uppercase to lowercase - DOCKER_REPOSITORY=$(echo ${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }} | tr '[A-Z]' '[a-z]') - echo "::set-output name=docker-repository::$DOCKER_REPOSITORY" - - - name: Pull image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: docker pull $DOCKER_REPOSITORY:latest || true - - - name: Bump version and push tag - id: tag_version - uses: mathieudutour/github-tag-action@v6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - tag_prefix: ${{ env.IMAGE_NAME }}=v - fetch_all_tags: true - - - name: Build image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - working-directory: ${{ env.WORKING_DIRECTORY }} - run: | - VERSION=$(echo "${{ steps.tag_version.outputs.new_tag }}" | awk -F=v '{print $NF}') - - echo DOCKER_REPOSITORY=${{ env.DOCKER_REPOSITORY }} - echo VERSION=$VERSION - - tar -czh . | docker build --load --tag ${{ env.DOCKER_REPOSITORY }}:latest --cache-from=${{ env.DOCKER_REPOSITORY }}:latest --build-arg VERSION=$VERSION - - docker tag ${{ env.DOCKER_REPOSITORY }}:latest ${{ env.DOCKER_REPOSITORY }}:$VERSION - - - name: Push image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: | - docker push --all-tags ${{ env.DOCKER_REPOSITORY }} \ No newline at end of file diff --git a/.github/workflows/cd-responders-portal-ui.yml b/.github/workflows/cd-responders-portal-ui.yml deleted file mode 100644 index 362c90762..000000000 --- a/.github/workflows/cd-responders-portal-ui.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: cd-responders-portal-ui - -on: - push: - branches: - - master - - paths: - - "responders/src/UI/**" - - ".github/workflows/cd-responders-portal-ui.yml" - -env: - IMAGE_NAME: responders-portal-ui - WORKING_DIRECTORY: ./responders/src/UI - -jobs: - build: - runs-on: ubuntu-latest - if: github.event_name == 'push' - - steps: - - uses: actions/checkout@v3 - - - uses: docker/setup-buildx-action@v2 - id: buildx - with: - install: true - - - name: Log into registry - uses: docker/login-action@v2 - with: - registry: ${{ secrets.DOCKER_REGISTRY }} - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set image repository - id: set_image_repository - run: | - # Set image repository and change all uppercase to lowercase - DOCKER_REPOSITORY=$(echo ${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }} | tr '[A-Z]' '[a-z]') - echo "::set-output name=docker-repository::$DOCKER_REPOSITORY" - - - name: Pull image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: docker pull $DOCKER_REPOSITORY:latest || true - - - name: Bump version and push tag - id: tag_version - uses: mathieudutour/github-tag-action@v6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - tag_prefix: ${{ env.IMAGE_NAME }}=v - fetch_all_tags: true - - - name: Build image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - working-directory: ${{ env.WORKING_DIRECTORY }} - run: | - VERSION=$(echo "${{ steps.tag_version.outputs.new_tag }}" | awk -F=v '{print $NF}') - - echo DOCKER_REPOSITORY=${{ env.DOCKER_REPOSITORY }} - echo VERSION=$VERSION - - tar -czh . | docker build --load --tag ${{ env.DOCKER_REPOSITORY }}:latest --cache-from=${{ env.DOCKER_REPOSITORY }}:latest --build-arg VERSION=$VERSION - - docker tag ${{ env.DOCKER_REPOSITORY }}:latest ${{ env.DOCKER_REPOSITORY }}:$VERSION - - - name: Push image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: | - docker push --all-tags ${{ env.DOCKER_REPOSITORY }} \ No newline at end of file diff --git a/.github/workflows/cd-suppliers-portal-api.yml b/.github/workflows/cd-suppliers-portal-api.yml deleted file mode 100644 index 4cbc21d51..000000000 --- a/.github/workflows/cd-suppliers-portal-api.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: cd-suppliers-portal-api - -on: - push: - branches: - - master - - paths: - - "suppliers/src/API/**" - - ".github/workflows/cd-suppliers-portal-api.yml" - -env: - IMAGE_NAME: suppliers-portal-api - WORKING_DIRECTORY: ./suppliers/src/API - -jobs: - build: - runs-on: ubuntu-latest - if: github.event_name == 'push' - - steps: - - uses: actions/checkout@v3 - - - uses: docker/setup-buildx-action@v2 - id: buildx - with: - install: true - - - name: Log into registry - uses: docker/login-action@v2 - with: - registry: ${{ secrets.DOCKER_REGISTRY }} - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set image repository - id: set_image_repository - run: | - # Set image repository and change all uppercase to lowercase - DOCKER_REPOSITORY=$(echo ${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }} | tr '[A-Z]' '[a-z]') - echo "::set-output name=docker-repository::$DOCKER_REPOSITORY" - - - name: Pull image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: docker pull $DOCKER_REPOSITORY:latest || true - - - name: Bump version and push tag - id: tag_version - uses: mathieudutour/github-tag-action@v6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - tag_prefix: ${{ env.IMAGE_NAME }}=v - fetch_all_tags: true - - - name: Build image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - working-directory: ${{ env.WORKING_DIRECTORY }} - run: | - VERSION=$(echo "${{ steps.tag_version.outputs.new_tag }}" | awk -F=v '{print $NF}') - - echo DOCKER_REPOSITORY=${{ env.DOCKER_REPOSITORY }} - echo VERSION=$VERSION - - tar -czh . | docker build --load --tag ${{ env.DOCKER_REPOSITORY }}:latest --cache-from=${{ env.DOCKER_REPOSITORY }}:latest --build-arg VERSION=$VERSION - - docker tag ${{ env.DOCKER_REPOSITORY }}:latest ${{ env.DOCKER_REPOSITORY }}:$VERSION - - - name: Push image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: | - docker push --all-tags ${{ env.DOCKER_REPOSITORY }} \ No newline at end of file diff --git a/.github/workflows/cd-suppliers-portal-ui.yml b/.github/workflows/cd-suppliers-portal-ui.yml deleted file mode 100644 index 678efec88..000000000 --- a/.github/workflows/cd-suppliers-portal-ui.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: cd-suppliers-portal-ui - -on: - push: - branches: - - master - - paths: - - "suppliers/src/UI/**" - - ".github/workflows/cd-suppliers-portal-ui.yml" - -env: - IMAGE_NAME: suppliers-portal-ui - WORKING_DIRECTORY: ./suppliers/src/UI - -jobs: - build: - runs-on: ubuntu-latest - if: github.event_name == 'push' - - steps: - - uses: actions/checkout@v3 - - - uses: docker/setup-buildx-action@v2 - id: buildx - with: - install: true - - - name: Log into registry - uses: docker/login-action@v2 - with: - registry: ${{ secrets.DOCKER_REGISTRY }} - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set image repository - id: set_image_repository - run: | - # Set image repository and change all uppercase to lowercase - DOCKER_REPOSITORY=$(echo ${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }} | tr '[A-Z]' '[a-z]') - echo "::set-output name=docker-repository::$DOCKER_REPOSITORY" - - - name: Pull image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: docker pull $DOCKER_REPOSITORY:latest || true - - - name: Bump version and push tag - id: tag_version - uses: mathieudutour/github-tag-action@v6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - tag_prefix: ${{ env.IMAGE_NAME }}=v - fetch_all_tags: true - - - name: Build image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - working-directory: ${{ env.WORKING_DIRECTORY }} - run: | - VERSION=$(echo "${{ steps.tag_version.outputs.new_tag }}" | awk -F=v '{print $NF}') - - echo DOCKER_REPOSITORY=${{ env.DOCKER_REPOSITORY }} - echo VERSION=$VERSION - - tar -czh . | docker build --load --tag ${{ env.DOCKER_REPOSITORY }}:latest --cache-from=${{ env.DOCKER_REPOSITORY }}:latest --build-arg VERSION=$VERSION - - docker tag ${{ env.DOCKER_REPOSITORY }}:latest ${{ env.DOCKER_REPOSITORY }}:$VERSION - - - name: Push image - env: - DOCKER_REPOSITORY: ${{ steps.set_image_repository.outputs.docker-repository }} - run: | - docker push --all-tags ${{ env.DOCKER_REPOSITORY }} \ No newline at end of file diff --git a/.github/workflows/ci-ess-backend.yml b/.github/workflows/ci-ess-backend.yml deleted file mode 100644 index d7466eca0..000000000 --- a/.github/workflows/ci-ess-backend.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: ci-ess-backend - -on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - "ess/src/API/**" - - "shared/src/**" - - ".github/workflows/ci-ess-backend.yml" - -env: - IMAGE_NAME: ess-backend - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: docker/setup-buildx-action@v3 - id: buildx - with: - install: true - - - name: Build image - working-directory: ./ess/src/API - run: tar -czh . | docker build --tag $IMAGE_NAME - diff --git a/.github/workflows/ci-landing-page.yml b/.github/workflows/ci-landing-page.yml deleted file mode 100644 index ce2967277..000000000 --- a/.github/workflows/ci-landing-page.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: ci-landing-page - -on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - "landing-page/src/**" - - ".github/workflows/ci-landing-page.yml" - -env: - IMAGE_NAME: landing-page - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: docker/setup-buildx-action@v3 - id: buildx - with: - install: true - - - name: Build image - working-directory: ./landing-page/src/ - run: docker build . --file Dockerfile --tag $IMAGE_NAME diff --git a/.github/workflows/ci-oauth-server.yml b/.github/workflows/ci-oauth-server.yml deleted file mode 100644 index e873a752f..000000000 --- a/.github/workflows/ci-oauth-server.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: ci-oauth-server - -on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - "oauth-server/src/API/**" - - ".github/workflows/ci-oauth-server.yml" - -env: - IMAGE_NAME: oauth-server - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: docker/setup-buildx-action@v3 - id: buildx - with: - install: true - - - name: Build image - working-directory: ./oauth-server/src/API - run: docker build . --file Dockerfile --tag $IMAGE_NAME diff --git a/.github/workflows/ci-registrants-portal-api.yml b/.github/workflows/ci-registrants-portal-api.yml deleted file mode 100644 index a27de11c4..000000000 --- a/.github/workflows/ci-registrants-portal-api.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: ci-registrants-portal-api - -on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - "registrants/src/API/**" - - "shared/src/**" - - ".github/workflows/ci-registrants-portal-api.yml" - -env: - IMAGE_NAME: registrants-portal-api - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: docker/setup-buildx-action@v3 - id: buildx - with: - install: true - - - name: Build image - working-directory: ./registrants/src/API - run: tar -czh . | docker build --tag $IMAGE_NAME - diff --git a/.github/workflows/ci-registrants-portal-ui.yml b/.github/workflows/ci-registrants-portal-ui.yml deleted file mode 100644 index dba33d9c0..000000000 --- a/.github/workflows/ci-registrants-portal-ui.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: ci-registrants-portal-ui - -on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - "registrants/src/UI/**" - - ".github/workflows/ci-registrants-portal-ui.yml" - -env: - IMAGE_NAME: registrants-portal-ui - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: docker/setup-buildx-action@v3 - id: buildx - with: - install: true - - - name: Build image - working-directory: ./registrants/src/UI - run: docker build . --file Dockerfile --tag $IMAGE_NAME diff --git a/.github/workflows/ci-responders-portal-api.yml b/.github/workflows/ci-responders-portal-api.yml deleted file mode 100644 index 308ed93ec..000000000 --- a/.github/workflows/ci-responders-portal-api.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: ci-responders-portal-api - -on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - "responders/src/API/**" - - "shared/src/**" - - ".github/workflows/ci-responders-portal-api.yml" - -env: - IMAGE_NAME: responders-portal-api - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: docker/setup-buildx-action@v3 - id: buildx - with: - install: true - - - name: Build image - working-directory: ./responders/src/API - run: tar -czh . | docker build --tag $IMAGE_NAME - diff --git a/.github/workflows/ci-responders-portal-ui.yml b/.github/workflows/ci-responders-portal-ui.yml deleted file mode 100644 index 32df253e0..000000000 --- a/.github/workflows/ci-responders-portal-ui.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: ci-responders-portal-ui - -on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - "responders/src/UI/**" - - ".github/workflows/ci-responders-portal-ui.yml" - -env: - IMAGE_NAME: responders-portal-ui - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: docker/setup-buildx-action@v3 - id: buildx - with: - install: true - - - name: Build image - working-directory: ./responders/src/UI - run: docker build . --file Dockerfile --tag $IMAGE_NAME diff --git a/.github/workflows/ci-suppliers-portal-api.yml b/.github/workflows/ci-suppliers-portal-api.yml deleted file mode 100644 index e69545ef2..000000000 --- a/.github/workflows/ci-suppliers-portal-api.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: ci-suppliers-portal-api - -on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - "suppliers/src/API/**" - - ".github/workflows/ci-suppliers-portal-api.yml" - -env: - IMAGE_NAME: suppliers-portal-api - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: docker/setup-buildx-action@v3 - id: buildx - with: - install: true - - - name: Build image - working-directory: ./suppliers/src/API - run: docker build . --file Dockerfile --tag $IMAGE_NAME --build-arg GITHUB_NUGET_USERNAME=github --build-arg GITHUB_NUGET_PAT=${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci-suppliers-portal-ui.yml b/.github/workflows/ci-suppliers-portal-ui.yml deleted file mode 100644 index 55e0aa230..000000000 --- a/.github/workflows/ci-suppliers-portal-ui.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: ci-suppliers-portal-ui - -on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - "suppliers/src/UI/**" - - ".github/workflows/ci-suppliers-portal-ui.yml" - -env: - IMAGE_NAME: suppliers-portal-ui - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: docker/setup-buildx-action@v3 - id: buildx - with: - install: true - - - name: Build image - working-directory: ./suppliers/src/UI - run: docker build . --file Dockerfile --tag $IMAGE_NAME From 9fdb9ea8970c043223dff97f92365247c90990a6 Mon Sep 17 00:00:00 2001 From: Yossi Tamari Date: Sun, 11 Feb 2024 14:21:18 -0800 Subject: [PATCH 2/6] fix: docker build context path --- .github/workflows/build-auth-server.yml | 2 +- .github/workflows/build-ess-backend.yml | 2 +- .github/workflows/build-landing-page.yml | 2 +- .github/workflows/build-registrants-portal.yml | 4 ++-- .github/workflows/build-responders-portal.yml | 4 ++-- .github/workflows/build-suppliers-portal.yml | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-auth-server.yml b/.github/workflows/build-auth-server.yml index 57a6cd4ee..b5c603897 100644 --- a/.github/workflows/build-auth-server.yml +++ b/.github/workflows/build-auth-server.yml @@ -23,7 +23,7 @@ jobs: id-token: write uses: ./.github/workflows/build-template.yml with: - IMAGE_CONTEXT: src + IMAGE_CONTEXT: oauth-server/src/API IMAGE_FILE: oauth-server/src/API/Dockerfile IMAGE_NAME: oauth-server REGISTRY: ${{ vars.DOCKER_REGISTRY }} diff --git a/.github/workflows/build-ess-backend.yml b/.github/workflows/build-ess-backend.yml index c56178043..9291af053 100644 --- a/.github/workflows/build-ess-backend.yml +++ b/.github/workflows/build-ess-backend.yml @@ -25,7 +25,7 @@ jobs: id-token: write uses: ./.github/workflows/build-template.yml with: - IMAGE_CONTEXT: src + IMAGE_CONTEXT: ess/src/API IMAGE_FILE: ess/src/API/Dockerfile IMAGE_NAME: ess-backend REGISTRY: ${{ vars.DOCKER_REGISTRY }} diff --git a/.github/workflows/build-landing-page.yml b/.github/workflows/build-landing-page.yml index 297a0780d..5a5e70b3a 100644 --- a/.github/workflows/build-landing-page.yml +++ b/.github/workflows/build-landing-page.yml @@ -23,7 +23,7 @@ jobs: id-token: write uses: ./.github/workflows/build-template.yml with: - IMAGE_CONTEXT: src + IMAGE_CONTEXT: landing-page/src IMAGE_FILE: landing-page/src/Dockerfile IMAGE_NAME: landing-page REGISTRY: ${{ vars.DOCKER_REGISTRY }} diff --git a/.github/workflows/build-registrants-portal.yml b/.github/workflows/build-registrants-portal.yml index 6aafd37ca..53918c429 100644 --- a/.github/workflows/build-registrants-portal.yml +++ b/.github/workflows/build-registrants-portal.yml @@ -27,7 +27,7 @@ jobs: id-token: write uses: ./.github/workflows/build-template.yml with: - IMAGE_CONTEXT: src + IMAGE_CONTEXT: registrants/src/API IMAGE_FILE: registrants/src/API/Dockerfile IMAGE_NAME: registrants-portal-api REGISTRY: ${{ vars.DOCKER_REGISTRY }} @@ -42,7 +42,7 @@ jobs: id-token: write uses: ./.github/workflows/build-template.yml with: - IMAGE_CONTEXT: src + IMAGE_CONTEXT: registrants/src/UI IMAGE_FILE: registrants/src/UI/Dockerfile IMAGE_NAME: registrants-portal-ui REGISTRY: ${{ vars.DOCKER_REGISTRY }} diff --git a/.github/workflows/build-responders-portal.yml b/.github/workflows/build-responders-portal.yml index 61ac2d206..c5e19f2c4 100644 --- a/.github/workflows/build-responders-portal.yml +++ b/.github/workflows/build-responders-portal.yml @@ -27,7 +27,7 @@ jobs: id-token: write uses: ./.github/workflows/build-template.yml with: - IMAGE_CONTEXT: src + IMAGE_CONTEXT: responders/src/API IMAGE_FILE: responders/src/API/Dockerfile IMAGE_NAME: responders-portal-api REGISTRY: ${{ vars.DOCKER_REGISTRY }} @@ -42,7 +42,7 @@ jobs: id-token: write uses: ./.github/workflows/build-template.yml with: - IMAGE_CONTEXT: src + IMAGE_CONTEXT: responders/src/UI IMAGE_FILE: responders/src/UI/Dockerfile IMAGE_NAME: responders-portal-ui REGISTRY: ${{ vars.DOCKER_REGISTRY }} diff --git a/.github/workflows/build-suppliers-portal.yml b/.github/workflows/build-suppliers-portal.yml index ce70be17c..1a11288d1 100644 --- a/.github/workflows/build-suppliers-portal.yml +++ b/.github/workflows/build-suppliers-portal.yml @@ -27,7 +27,7 @@ jobs: id-token: write uses: ./.github/workflows/build-template.yml with: - IMAGE_CONTEXT: src + IMAGE_CONTEXT: suppliers/src/API IMAGE_FILE: suppliers/src/API/Dockerfile IMAGE_NAME: suppliers-portal-api REGISTRY: ${{ vars.DOCKER_REGISTRY }} @@ -41,7 +41,7 @@ jobs: id-token: write uses: ./.github/workflows/build-template.yml with: - IMAGE_CONTEXT: src + IMAGE_CONTEXT: suppliers/src/UI IMAGE_FILE: suppliers/src/UI/Dockerfile IMAGE_NAME: suppliers-portal-ui REGISTRY: ${{ vars.DOCKER_REGISTRY }} From cd6bae205838c3fa040a41a38a15778c4a2619fc Mon Sep 17 00:00:00 2001 From: Yossi Tamari Date: Mon, 12 Feb 2024 11:30:49 -0800 Subject: [PATCH 3/6] task: converted image building to use build context instead of tarballs --- .github/workflows/build-ess-backend.yml | 1 + .../workflows/build-registrants-portal.yml | 1 + .github/workflows/build-responders-portal.yml | 1 + .github/workflows/build-template.yml | 5 ++++ .gitignore | 2 ++ CONTRIBUTING.md | 6 ++-- ess/src/API/.dockerignore | 11 +++++++- ess/src/API/Dockerfile | 28 ++++++++++--------- registrants/src/API/.dockerignore | 10 ++++++- registrants/src/API/Dockerfile | 23 +++++++++------ responders/src/API/.dockerignore | 10 ++++++- responders/src/API/Dockerfile | 23 +++++++++------ 12 files changed, 85 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build-ess-backend.yml b/.github/workflows/build-ess-backend.yml index 9291af053..68d035b0c 100644 --- a/.github/workflows/build-ess-backend.yml +++ b/.github/workflows/build-ess-backend.yml @@ -26,6 +26,7 @@ jobs: uses: ./.github/workflows/build-template.yml with: IMAGE_CONTEXT: ess/src/API + BUILD_CONTEXT: "['shared=../../../shared/src']" IMAGE_FILE: ess/src/API/Dockerfile IMAGE_NAME: ess-backend REGISTRY: ${{ vars.DOCKER_REGISTRY }} diff --git a/.github/workflows/build-registrants-portal.yml b/.github/workflows/build-registrants-portal.yml index 53918c429..b731eaa6d 100644 --- a/.github/workflows/build-registrants-portal.yml +++ b/.github/workflows/build-registrants-portal.yml @@ -28,6 +28,7 @@ jobs: uses: ./.github/workflows/build-template.yml with: IMAGE_CONTEXT: registrants/src/API + BUILD_CONTEXT: "['shared=../../../shared/src']" IMAGE_FILE: registrants/src/API/Dockerfile IMAGE_NAME: registrants-portal-api REGISTRY: ${{ vars.DOCKER_REGISTRY }} diff --git a/.github/workflows/build-responders-portal.yml b/.github/workflows/build-responders-portal.yml index c5e19f2c4..b17b8b1ef 100644 --- a/.github/workflows/build-responders-portal.yml +++ b/.github/workflows/build-responders-portal.yml @@ -28,6 +28,7 @@ jobs: uses: ./.github/workflows/build-template.yml with: IMAGE_CONTEXT: responders/src/API + BUILD_CONTEXT: "['shared=../../../shared/src']" IMAGE_FILE: responders/src/API/Dockerfile IMAGE_NAME: responders-portal-api REGISTRY: ${{ vars.DOCKER_REGISTRY }} diff --git a/.github/workflows/build-template.yml b/.github/workflows/build-template.yml index e97c6a2d9..5342bd1fe 100644 --- a/.github/workflows/build-template.yml +++ b/.github/workflows/build-template.yml @@ -6,6 +6,10 @@ on: IMAGE_CONTEXT: required: true type: string + BUILD_CONTEXT: + required: false + type: string + default: "[]" IMAGE_FILE: required: true type: string @@ -63,6 +67,7 @@ jobs: uses: docker/build-push-action@v5 with: context: ${{ inputs.IMAGE_CONTEXT }} + build-contexts: ${{ fromJson(inputs.BUILD_CONTEXT) }} file: ${{ inputs.IMAGE_FILE }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} diff --git a/.gitignore b/.gitignore index 3dd6fa233..463148c19 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .vs +.idea +.cr **/node_modules/ # environment variables for docker-compose *.env diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e2f693fc1..55c174ec4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,14 +38,12 @@ You must be on the BC government network to be able to access the Dynamics backe Every deployable component of the system has its own dockerfile which includes the entire CI pipeline - build, verify quality and run all tests. The philosophy behind this is to ensure that if a container can be built, it is tested and verified. It also means the repeatability of the build process as it would be the same in CI/CD pipelines and in local developer environment. -Due to the usage of symlinks to share code, docker builds must pass the context as tar files and not as a directory. To build the docker image locally, run the following command in a component's root folder: +As the shared libraries are symlinked to the API projects, the image build process relies on build-context to pass in the shared libraries' code. To build an image manually, pass in a build context referring to the relative path of the shared libraries: ```cmd -tar -czh . | docker build -t - +docker build -t --build-context shared=../../../shared/src . ``` -Note: tar to pipe is not supported currently in Windows, this command would only work in GIT Bash and Docker-Desktop/Rancher-Desktop, or in wsl2 with podman. - ## Code Quality ### C# services diff --git a/ess/src/API/.dockerignore b/ess/src/API/.dockerignore index 3729ff0cd..d2c0cb7a1 100644 --- a/ess/src/API/.dockerignore +++ b/ess/src/API/.dockerignore @@ -22,4 +22,13 @@ **/secrets.dev.yaml **/values.dev.yaml LICENSE -README.md \ No newline at end of file +README.md +**/TestResults + +# ignore symlinks +EMBC.ESS.Shared.Contracts +EMBC.Utilities +EMBC.Utilities.Caching +EMBC.Utilities.Hosting +EMBC.Utilities.Messaging +EMBC.Utilities.Telemetry \ No newline at end of file diff --git a/ess/src/API/Dockerfile b/ess/src/API/Dockerfile index 741db1cf5..dd76f5ffb 100644 --- a/ess/src/API/Dockerfile +++ b/ess/src/API/Dockerfile @@ -15,21 +15,23 @@ RUN dotnet tool install --tool-path /tools dotnet-counters RUN dotnet tool install --tool-path /tools dotnet-dump WORKDIR /src -COPY ["EMBC.ESS/EMBC.ESS.csproj", "EMBC.ESS/"] -COPY ["EMBC.ESS.Host/EMBC.ESS.Host.csproj", "EMBC.ESS.Host/"] -COPY ["EMBC.ESS.Shared.Contracts/EMBC.ESS.Shared.Contracts.csproj", "EMBC.ESS.Shared.Contracts/"] -COPY ["EMBC.ESS.Utilities.Dynamics/EMBC.ESS.Utilities.Dynamics.csproj", "EMBC.ESS.Utilities.Dynamics/"] -COPY ["EMBC.ESS.Utilities.BceidWS/EMBC.ESS.Utilities.BceidWS.csproj", "EMBC.ESS.Utilities.BceidWS/"] -COPY ["EMBC.ESS.Utilities.Cas/EMBC.ESS.Utilities.Cas.csproj", "EMBC.ESS.Utilities.Cas/"] -COPY ["EMBC.Utilities.Hosting/EMBC.Utilities.Hosting.csproj", "EMBC.Utilities.Hosting/"] -COPY ["EMBC.Utilities.Caching/EMBC.Utilities.Caching.csproj", "EMBC.Utilities.Caching/"] -COPY ["EMBC.Utilities.Telemetry/EMBC.Utilities.Telemetry.csproj", "EMBC.Utilities.Telemetry/"] -COPY ["EMBC.Utilities.Messaging/EMBC.Utilities.Messaging.csproj", "EMBC.Utilities.Messaging/"] -COPY ["EMBC.Utilities/EMBC.Utilities.csproj", "EMBC.Utilities/"] -COPY ["EMBC.Tests.Unit.ESS/EMBC.Tests.Unit.ESS.csproj", "EMBC.Tests.Unit.ESS/"] -COPY ["EMBC.Tests.Integration.ESS/EMBC.Tests.Integration.ESS.csproj", "EMBC.Tests.Integration.ESS/"] + +# copy sln and csproj files to their directories COPY ["EMBC.ESS.sln", ".editorconfig", "./"] +COPY */*.csproj ./ +COPY --from=shared */*.csproj ./ +RUN cat EMBC.ESS.sln \ +| grep "\.csproj" \ +| awk '{print $4}' \ +| sed -e 's/[",]//g' \ +| sed 's#\\#/#g' \ +| xargs -I % sh -c 'mkdir -p $(dirname %) && mv $(basename %) $(dirname %)/' + +# restore dependencies RUN dotnet restore . + +# copy the rest of the files +COPY --from=shared . . COPY . . # run unit tests diff --git a/registrants/src/API/.dockerignore b/registrants/src/API/.dockerignore index 3729ff0cd..04fc74cfd 100644 --- a/registrants/src/API/.dockerignore +++ b/registrants/src/API/.dockerignore @@ -22,4 +22,12 @@ **/secrets.dev.yaml **/values.dev.yaml LICENSE -README.md \ No newline at end of file +README.md + +# ignore symlinks +EMBC.ESS.Shared.Contracts +EMBC.Utilities +EMBC.Utilities.Caching +EMBC.Utilities.Hosting +EMBC.Utilities.Messaging +EMBC.Utilities.Telemetry \ No newline at end of file diff --git a/registrants/src/API/Dockerfile b/registrants/src/API/Dockerfile index dc7fce73b..d092b0086 100644 --- a/registrants/src/API/Dockerfile +++ b/registrants/src/API/Dockerfile @@ -15,16 +15,23 @@ RUN dotnet tool install --tool-path /tools dotnet-counters RUN dotnet tool install --tool-path /tools dotnet-dump WORKDIR /src -COPY ["EMBC.Registrants.API/EMBC.Registrants.API.csproj", "EMBC.Registrants.API/"] -COPY ["EMBC.ESS.Shared.Contracts/EMBC.ESS.Shared.Contracts.csproj", "EMBC.ESS.Shared.Contracts/"] -COPY ["EMBC.Utilities/EMBC.Utilities.csproj", "EMBC.Utilities/"] -COPY ["EMBC.Utilities.Hosting/EMBC.Utilities.Hosting.csproj", "EMBC.Utilities.Hosting/"] -COPY ["EMBC.Utilities.Caching/EMBC.Utilities.Caching.csproj", "EMBC.Utilities.Caching/"] -COPY ["EMBC.Utilities.Telemetry/EMBC.Utilities.Telemetry.csproj", "EMBC.Utilities.Telemetry/"] -COPY ["EMBC.Utilities.Messaging/EMBC.Utilities.Messaging.csproj", "EMBC.Utilities.Messaging/"] -COPY ["EMBC.Tests.Unit.Registrants.API/EMBC.Tests.Unit.Registrants.API.csproj", "EMBC.Tests.Unit.Registrants.API/"] + +# copy sln and csproj files to their directories COPY ["EMBC.Registrants.sln", ".editorconfig", "./"] +COPY */*.csproj ./ +COPY --from=shared */*.csproj ./ +RUN cat EMBC.Registrants.sln \ +| grep "\.csproj" \ +| awk '{print $4}' \ +| sed -e 's/[",]//g' \ +| sed 's#\\#/#g' \ +| xargs -I % sh -c 'mkdir -p $(dirname %) && mv $(basename %) $(dirname %)/' + +# restore dependencies RUN dotnet restore . + +# copy the rest of the files +COPY --from=shared . . COPY . . # run unit tests diff --git a/responders/src/API/.dockerignore b/responders/src/API/.dockerignore index 3729ff0cd..04fc74cfd 100644 --- a/responders/src/API/.dockerignore +++ b/responders/src/API/.dockerignore @@ -22,4 +22,12 @@ **/secrets.dev.yaml **/values.dev.yaml LICENSE -README.md \ No newline at end of file +README.md + +# ignore symlinks +EMBC.ESS.Shared.Contracts +EMBC.Utilities +EMBC.Utilities.Caching +EMBC.Utilities.Hosting +EMBC.Utilities.Messaging +EMBC.Utilities.Telemetry \ No newline at end of file diff --git a/responders/src/API/Dockerfile b/responders/src/API/Dockerfile index 79a02baa4..09221e088 100644 --- a/responders/src/API/Dockerfile +++ b/responders/src/API/Dockerfile @@ -14,16 +14,23 @@ RUN dotnet tool install --tool-path /tools dotnet-counters RUN dotnet tool install --tool-path /tools dotnet-dump WORKDIR /src -COPY ["EMBC.Responders.API/EMBC.Responders.API.csproj", "EMBC.Responders.API/"] -COPY ["EMBC.ESS.Shared.Contracts/EMBC.ESS.Shared.Contracts.csproj", "EMBC.ESS.Shared.Contracts/"] -COPY ["EMBC.Utilities/EMBC.Utilities.csproj", "EMBC.Utilities/"] -COPY ["EMBC.Utilities.Hosting/EMBC.Utilities.Hosting.csproj", "EMBC.Utilities.Hosting/"] -COPY ["EMBC.Utilities.Caching/EMBC.Utilities.Caching.csproj", "EMBC.Utilities.Caching/"] -COPY ["EMBC.Utilities.Telemetry/EMBC.Utilities.Telemetry.csproj", "EMBC.Utilities.Telemetry/"] -COPY ["EMBC.Utilities.Messaging/EMBC.Utilities.Messaging.csproj", "EMBC.Utilities.Messaging/"] -COPY ["EMBC.Tests.Unit.Responders.API/EMBC.Tests.Unit.Responders.API.csproj", "EMBC.Tests.Unit.Responders.API/"] + +# copy sln and csproj files to their directories COPY ["EMBC.Responders.sln", ".editorconfig", "./"] +COPY */*.csproj ./ +COPY --from=shared */*.csproj ./ +RUN cat EMBC.Responders.sln \ +| grep "\.csproj" \ +| awk '{print $4}' \ +| sed -e 's/[",]//g' \ +| sed 's#\\#/#g' \ +| xargs -I % sh -c 'mkdir -p $(dirname %) && mv $(basename %) $(dirname %)/' + +# restore dependencies RUN dotnet restore . + +# copy the rest of the files +COPY --from=shared . . COPY . . # run unit tests From b5f86aea61a47c189f51e5ae56ed2b4a3e626d49 Mon Sep 17 00:00:00 2001 From: Yossi Tamari Date: Mon, 12 Feb 2024 11:32:24 -0800 Subject: [PATCH 4/6] fix: build template syntax --- .github/workflows/build-template.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-template.yml b/.github/workflows/build-template.yml index 5342bd1fe..af173a831 100644 --- a/.github/workflows/build-template.yml +++ b/.github/workflows/build-template.yml @@ -67,7 +67,8 @@ jobs: uses: docker/build-push-action@v5 with: context: ${{ inputs.IMAGE_CONTEXT }} - build-contexts: ${{ fromJson(inputs.BUILD_CONTEXT) }} + build-contexts: | + ${{ fromJson(inputs.BUILD_CONTEXT) }} file: ${{ inputs.IMAGE_FILE }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} From 84113af10c575d4327b10099d09e6e4858f9c8d9 Mon Sep 17 00:00:00 2001 From: Yossi Tamari Date: Mon, 12 Feb 2024 11:36:11 -0800 Subject: [PATCH 5/6] fix: changed build-context to list --- .github/workflows/build-ess-backend.yml | 2 +- .github/workflows/build-registrants-portal.yml | 2 +- .github/workflows/build-responders-portal.yml | 2 +- .github/workflows/build-template.yml | 5 ++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-ess-backend.yml b/.github/workflows/build-ess-backend.yml index 68d035b0c..5973cce08 100644 --- a/.github/workflows/build-ess-backend.yml +++ b/.github/workflows/build-ess-backend.yml @@ -26,7 +26,7 @@ jobs: uses: ./.github/workflows/build-template.yml with: IMAGE_CONTEXT: ess/src/API - BUILD_CONTEXT: "['shared=../../../shared/src']" + BUILD_CONTEXT: "shared=../../../shared/src" IMAGE_FILE: ess/src/API/Dockerfile IMAGE_NAME: ess-backend REGISTRY: ${{ vars.DOCKER_REGISTRY }} diff --git a/.github/workflows/build-registrants-portal.yml b/.github/workflows/build-registrants-portal.yml index b731eaa6d..7639c6077 100644 --- a/.github/workflows/build-registrants-portal.yml +++ b/.github/workflows/build-registrants-portal.yml @@ -28,7 +28,7 @@ jobs: uses: ./.github/workflows/build-template.yml with: IMAGE_CONTEXT: registrants/src/API - BUILD_CONTEXT: "['shared=../../../shared/src']" + BUILD_CONTEXT: "shared=../../../shared/src" IMAGE_FILE: registrants/src/API/Dockerfile IMAGE_NAME: registrants-portal-api REGISTRY: ${{ vars.DOCKER_REGISTRY }} diff --git a/.github/workflows/build-responders-portal.yml b/.github/workflows/build-responders-portal.yml index b17b8b1ef..450bef061 100644 --- a/.github/workflows/build-responders-portal.yml +++ b/.github/workflows/build-responders-portal.yml @@ -28,7 +28,7 @@ jobs: uses: ./.github/workflows/build-template.yml with: IMAGE_CONTEXT: responders/src/API - BUILD_CONTEXT: "['shared=../../../shared/src']" + BUILD_CONTEXT: "shared=../../../shared/src" IMAGE_FILE: responders/src/API/Dockerfile IMAGE_NAME: responders-portal-api REGISTRY: ${{ vars.DOCKER_REGISTRY }} diff --git a/.github/workflows/build-template.yml b/.github/workflows/build-template.yml index af173a831..5c74026a5 100644 --- a/.github/workflows/build-template.yml +++ b/.github/workflows/build-template.yml @@ -9,7 +9,7 @@ on: BUILD_CONTEXT: required: false type: string - default: "[]" + default: "" IMAGE_FILE: required: true type: string @@ -67,8 +67,7 @@ jobs: uses: docker/build-push-action@v5 with: context: ${{ inputs.IMAGE_CONTEXT }} - build-contexts: | - ${{ fromJson(inputs.BUILD_CONTEXT) }} + build-contexts: ${{ inputs.BUILD_CONTEXT }} file: ${{ inputs.IMAGE_FILE }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} From e48ebad46cf10f0d2413ae4291d663e51e5a674b Mon Sep 17 00:00:00 2001 From: Yossi Tamari Date: Mon, 12 Feb 2024 11:40:01 -0800 Subject: [PATCH 6/6] fix: changed shared folder path --- .github/workflows/build-ess-backend.yml | 2 +- .github/workflows/build-registrants-portal.yml | 2 +- .github/workflows/build-responders-portal.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-ess-backend.yml b/.github/workflows/build-ess-backend.yml index 5973cce08..0c08a0c77 100644 --- a/.github/workflows/build-ess-backend.yml +++ b/.github/workflows/build-ess-backend.yml @@ -26,7 +26,7 @@ jobs: uses: ./.github/workflows/build-template.yml with: IMAGE_CONTEXT: ess/src/API - BUILD_CONTEXT: "shared=../../../shared/src" + BUILD_CONTEXT: "shared=./shared/src" IMAGE_FILE: ess/src/API/Dockerfile IMAGE_NAME: ess-backend REGISTRY: ${{ vars.DOCKER_REGISTRY }} diff --git a/.github/workflows/build-registrants-portal.yml b/.github/workflows/build-registrants-portal.yml index 7639c6077..72ed8a6fd 100644 --- a/.github/workflows/build-registrants-portal.yml +++ b/.github/workflows/build-registrants-portal.yml @@ -28,7 +28,7 @@ jobs: uses: ./.github/workflows/build-template.yml with: IMAGE_CONTEXT: registrants/src/API - BUILD_CONTEXT: "shared=../../../shared/src" + BUILD_CONTEXT: "shared=./shared/src" IMAGE_FILE: registrants/src/API/Dockerfile IMAGE_NAME: registrants-portal-api REGISTRY: ${{ vars.DOCKER_REGISTRY }} diff --git a/.github/workflows/build-responders-portal.yml b/.github/workflows/build-responders-portal.yml index 450bef061..9f397cd06 100644 --- a/.github/workflows/build-responders-portal.yml +++ b/.github/workflows/build-responders-portal.yml @@ -28,7 +28,7 @@ jobs: uses: ./.github/workflows/build-template.yml with: IMAGE_CONTEXT: responders/src/API - BUILD_CONTEXT: "shared=../../../shared/src" + BUILD_CONTEXT: "shared=./shared/src" IMAGE_FILE: responders/src/API/Dockerfile IMAGE_NAME: responders-portal-api REGISTRY: ${{ vars.DOCKER_REGISTRY }}