From 72c10eaa1980952c0358736a51ccf93a49034ad5 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 09:43:08 +0100 Subject: [PATCH 01/32] chore(build): test umbrella job to build the client in a coordinated process --- .github/workflows/bff_develop.yml | 47 +++++++++++++++------------- .github/workflows/client_develop.yml | 41 ++++++++++++++++++++++++ .github/workflows/fe-e2e-test.yml | 27 +++++++++++++--- .github/workflows/fe_develop.yml | 42 +++++++++++++++---------- 4 files changed, 115 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/client_develop.yml diff --git a/.github/workflows/bff_develop.yml b/.github/workflows/bff_develop.yml index b67da6893..372052a54 100644 --- a/.github/workflows/bff_develop.yml +++ b/.github/workflows/bff_develop.yml @@ -4,23 +4,40 @@ name: BFF Develop on: - push: - branches: - - develop - paths: - - iris-client-bff/** - - .github/workflows/bff_develop.yml - pull_request: - branches: - - develop + workflow_call: + secrets: + DOCKER_HUB_USER: + required: true + DOCKER_HUB_PW: + required: true defaults: run: shell: bash jobs: + pre_job: + name: Determines job skipping + # continue-on-error: true # Uncomment once integration is finished + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + # All of these options are optional, so you can remove them if you are happy with the defaults + skip_after_successful_duplicate: 'false' + concurrent_skipping: 'never' + cancel_others: 'true' + paths: '["iris-client-bff/**", ".github/workflows/bff_develop.yml"]' + paths_ignore: '["**/README.md", "**/docs/**", "**/postman/**"]' + build_and_push: name: Build and push to docker.io + needs: pre_job + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest # Map a step output to a job output @@ -67,15 +84,3 @@ jobs: **/surefire-reports/*.xml **/failsafe-reports/*.xml !**/failsafe-reports/failsafe-summary.xml - - publish-test-results: - name: Publish Test Results - needs: build_and_push - uses: iris-connect/iris-client/.github/workflows/publish-test-results.yml@develop - - container_scan: - name: Container Scan - needs: build_and_push - uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop - with: - image-refs: "[ '${{needs.build_and_push.outputs.image-ref}}' ]" diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml new file mode 100644 index 000000000..927b48b1b --- /dev/null +++ b/.github/workflows/client_develop.yml @@ -0,0 +1,41 @@ +name: Client Develop + +on: + push: + branches: + - develop + pull_request: + branches: + - develop + +jobs: + bff: + name: Build BFF + uses: iris-connect/iris-client/.github/workflows/bff_develop.yml@chore/optimized_build + secrets: + DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} + DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} + + publish-test-results: + name: Publish Test Results + needs: bff + uses: iris-connect/iris-client/.github/workflows/publish-test-results.yml@develop + + fe: + name: Build FE + uses: iris-connect/iris-client/.github/workflows/fe_develop.yml@chore/optimized_build + secrets: + DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} + DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} + + e2e_test: + name: Run E2E Tests + needs: bff + uses: iris-connect/iris-client/.github/workflows/fe-e2e-test.yml@chore/optimized_build + + container_scan: + name: Container Scan + needs: [bff, fe] + uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop + with: + image-refs: "[ '${{needs.bff.outputs.image-ref}}', '${{needs.fe.outputs.image-ref}}' ]" diff --git a/.github/workflows/fe-e2e-test.yml b/.github/workflows/fe-e2e-test.yml index 223ded1a9..df0c3ea82 100644 --- a/.github/workflows/fe-e2e-test.yml +++ b/.github/workflows/fe-e2e-test.yml @@ -5,15 +5,32 @@ on: branches: - main - release - - develop - 1.** - pull_request: - branches: - - develop + workflow_call: jobs: + pre_job: + name: Determines job skipping + # continue-on-error: true # Uncomment once integration is finished + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + # All of these options are optional, so you can remove them if you are happy with the defaults + skip_after_successful_duplicate: 'true' + concurrent_skipping: 'never' + cancel_others: 'true' + paths_ignore: '["**/README.md", "**/docs/**", "**/postman/**", ".reuse/**", "infrastructure/**", "LICENSES/**", "iris-client-eps/**"]' + cypress-run: - runs-on: ubuntu-20.04 + name: Run Cypress E2E Tests + needs: pre_job + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2.4.0 diff --git a/.github/workflows/fe_develop.yml b/.github/workflows/fe_develop.yml index ebdd3a009..4386eacc6 100644 --- a/.github/workflows/fe_develop.yml +++ b/.github/workflows/fe_develop.yml @@ -1,19 +1,36 @@ name: FE Develop on: - push: - branches: - - develop - paths: - - iris-client-fe/** - - .github/workflows/fe_develop.yml - pull_request: - branches: - - develop + workflow_call: + secrets: + DOCKER_HUB_USER: + required: true + DOCKER_HUB_PW: + required: true jobs: + pre_job: + name: Determines job skipping + # continue-on-error: true # Uncomment once integration is finished + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + # All of these options are optional, so you can remove them if you are happy with the defaults + skip_after_successful_duplicate: 'false' + concurrent_skipping: 'never' + cancel_others: 'true' + paths: '["iris-client-fe/**", ".github/workflows/fe_develop.yml"]' + paths_ignore: '["**/README.md", "**/docs/**", "**/postman/**"]' + build_and_push: name: Build and push to docker.io + needs: pre_job + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest # Map a step output to a job output @@ -50,10 +67,3 @@ jobs: VUE_APP_BUILD_ID=${{ github.sha }} labels: | iris.client-fe.image.revision=${{ github.sha }} - - container_scan: - name: Container Scan - needs: build_and_push - uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop - with: - image-refs: "[ '${{needs.build_and_push.outputs.image-ref}}' ]" From b2061fb1d2f5473a4902adcc1d057b85eff7fa3a Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 11:46:47 +0100 Subject: [PATCH 02/32] chore(build): test expressions for if --- .github/workflows/test.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..fca18064d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,31 @@ +name: Job Conditionals + +on: workflow_dispatch + +jobs: + a: + if: true + runs-on: ubuntu-latest + + steps: + - run: echo "Hello world a" + b: + if: false + runs-on: ubuntu-latest + + steps: + - run: echo "Hello world b" + c: + if: false + runs-on: ubuntu-latest + + steps: + - run: echo "Hello world c" + + d: + needs: [a, b, c] + if: ${{ contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') }} + runs-on: ubuntu-latest + + steps: + - run: echo "Hello world d" From 246032a3e1ac063052fab230f73fe25bdc4d9978 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 12:39:24 +0100 Subject: [PATCH 03/32] chore(build): test expressions for if 2 --- .github/workflows/test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fca18064d..966b7fb45 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,10 @@ name: Job Conditionals -on: workflow_dispatch +on: + workflow_dispatch: + push: + branches: + - chore/optimized_build jobs: a: From 900e10402c72f775c38a9806e9c337ca7e1089e0 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 12:41:08 +0100 Subject: [PATCH 04/32] chore(build): moves tag determination do head workflow Outputs from a workflow can't be used in another workflow. --- .github/workflows/bff_develop.yml | 19 +++++++------------ .github/workflows/client_develop.yml | 27 ++++++++++++++++++++++----- .github/workflows/fe_develop.yml | 22 ++++++++++------------ 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/.github/workflows/bff_develop.yml b/.github/workflows/bff_develop.yml index 372052a54..7dfb2a4f6 100644 --- a/.github/workflows/bff_develop.yml +++ b/.github/workflows/bff_develop.yml @@ -5,6 +5,11 @@ name: BFF Develop on: workflow_call: + inputs: + image_tag: + description: 'Tag that will be added to the image name' + required: true + type: string secrets: DOCKER_HUB_USER: required: true @@ -18,7 +23,7 @@ defaults: jobs: pre_job: name: Determines job skipping - # continue-on-error: true # Uncomment once integration is finished + continue-on-error: true # Uncomment once integration is finished runs-on: ubuntu-latest # Map a step output to a job output outputs: @@ -40,10 +45,6 @@ jobs: if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest - # Map a step output to a job output - outputs: - image-ref: ${{ steps.meta.outputs.tags }} - steps: - name: Checkout code uses: actions/checkout@v2.4.0 @@ -62,15 +63,9 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - - name: Create image tag - id: meta - uses: docker/metadata-action@v3 - with: - images: inoeg/iris-client-bff - - name: build, package and publish the image run: | - mvn -B clean verify spring-boot:build-image -am -pl iris-client-bff -Dspring-boot.build-image.publish=true -Dversion.tag=${{ steps.meta.outputs.version }} + mvn -B clean verify spring-boot:build-image -am -pl iris-client-bff -Dspring-boot.build-image.publish=true -Dversion.tag=${{ inputs.image_tag }} env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 927b48b1b..6b3545d93 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -9,9 +9,23 @@ on: - develop jobs: + determine_tag: + name: Determines Image Tag + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + image_tag: ${{ steps.meta.outputs.version }} + steps: + - name: Determines Image Tag + id: meta + uses: docker/metadata-action@v3 + bff: name: Build BFF + needs: determine_tag uses: iris-connect/iris-client/.github/workflows/bff_develop.yml@chore/optimized_build + with: + image_tag: ${{needs.determine_tag.outputs.image_tag}} secrets: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} @@ -23,19 +37,22 @@ jobs: fe: name: Build FE + needs: determine_tag uses: iris-connect/iris-client/.github/workflows/fe_develop.yml@chore/optimized_build + with: + image_tag: ${{needs.determine_tag.outputs.image_tag}} secrets: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} - e2e_test: - name: Run E2E Tests - needs: bff - uses: iris-connect/iris-client/.github/workflows/fe-e2e-test.yml@chore/optimized_build +# e2e_test: +# name: Run E2E Tests +# needs: bff +# uses: iris-connect/iris-client/.github/workflows/fe-e2e-test.yml@chore/optimized_build container_scan: name: Container Scan needs: [bff, fe] uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop with: - image-refs: "[ '${{needs.bff.outputs.image-ref}}', '${{needs.fe.outputs.image-ref}}' ]" + image-refs: "[ 'inoeg/iris-client-bff:${{needs.determine_tag.outputs.image_tag}}', 'inoeg/iris-client-frontend:${{needs.determine_tag.outputs.image_tag}}' ]" diff --git a/.github/workflows/fe_develop.yml b/.github/workflows/fe_develop.yml index 4386eacc6..184d30ecf 100644 --- a/.github/workflows/fe_develop.yml +++ b/.github/workflows/fe_develop.yml @@ -2,6 +2,11 @@ name: FE Develop on: workflow_call: + inputs: + image_tag: + description: 'Tag that will be added to the image name' + required: true + type: string secrets: DOCKER_HUB_USER: required: true @@ -11,7 +16,7 @@ on: jobs: pre_job: name: Determines job skipping - # continue-on-error: true # Uncomment once integration is finished + continue-on-error: true # Uncomment once integration is finished runs-on: ubuntu-latest # Map a step output to a job output outputs: @@ -33,9 +38,8 @@ jobs: if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest - # Map a step output to a job output - outputs: - image-ref: ${{ steps.meta.outputs.tags }} + env: + tags: inoeg/iris-client-frontend:${{ inputs.image_tag }} steps: - name: Check out the repo @@ -44,12 +48,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - - name: Create image tag - id: meta - uses: docker/metadata-action@v3 - with: - images: inoeg/iris-client-frontend - - name: Login to DockerHub uses: docker/login-action@v1 with: @@ -60,10 +58,10 @@ jobs: uses: docker/build-push-action@v2.7.0 with: context: ./iris-client-fe/ - tags: ${{ steps.meta.outputs.tags }} + tags: ${{ env.tags }} push: true build-args: | - VUE_APP_VERSION_ID=${{ steps.meta.outputs.tags }} + VUE_APP_VERSION_ID=${{ env.tags }} VUE_APP_BUILD_ID=${{ github.sha }} labels: | iris.client-fe.image.revision=${{ github.sha }} From b8cea523ec31e78ec18136fd4dbb5536c237f598 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 12:48:55 +0100 Subject: [PATCH 05/32] chore(build): test expressions for if 3 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 966b7fb45..59fcc0040 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,7 +28,7 @@ jobs: d: needs: [a, b, c] - if: ${{ contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') }} + if: ${{ always() && contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') }} runs-on: ubuntu-latest steps: From ceeffe5616f5d3183e8c840a188b8ecff3de1fe4 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 12:49:55 +0100 Subject: [PATCH 06/32] chore(build): moves tag determination do head workflow 2 Outputs from a workflow can't be used in another workflow. --- .github/workflows/client_develop.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 6b3545d93..ba48ff2f8 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -15,10 +15,15 @@ jobs: # Map a step output to a job output outputs: image_tag: ${{ steps.meta.outputs.version }} + images: ${{ steps.meta.outputs.tags }} steps: - name: Determines Image Tag id: meta uses: docker/metadata-action@v3 + with: + images: inoeg/iris-client-bff, inoeg/iris-client-frontend + - name: "Hello world when it's Monday" + run: echo "${{ steps.meta.outputs.tags }}" bff: name: Build BFF @@ -56,3 +61,10 @@ jobs: uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop with: image-refs: "[ 'inoeg/iris-client-bff:${{needs.determine_tag.outputs.image_tag}}', 'inoeg/iris-client-frontend:${{needs.determine_tag.outputs.image_tag}}' ]" + + container_scan2: + name: Container Scan 2 + needs: [bff, fe] + uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop + with: + image-refs: "[ ${{needs.determine_tag.outputs.images}} ]" From 889f22615c2e4282200ef0bc3e9f1f831e0a06dc Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 13:08:21 +0100 Subject: [PATCH 07/32] chore(build): test expressions for if 4 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 59fcc0040..7b1491afa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - - run: echo "Hello world b" + - run: exit 1 c: if: false runs-on: ubuntu-latest From b5a939db371e74c09b72d1aa114741fbd466d233 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 13:08:48 +0100 Subject: [PATCH 08/32] chore(build): moves tag determination do head workflow 3 Outputs from a workflow can't be used in another workflow. --- .github/workflows/client_develop.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index ba48ff2f8..d2088e0a7 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -22,8 +22,15 @@ jobs: uses: docker/metadata-action@v3 with: images: inoeg/iris-client-bff, inoeg/iris-client-frontend - - name: "Hello world when it's Monday" + sep-tags: "," + flavor: | + latest=auto + prefix= "'" + suffix= "'" + - name: "Hello " run: echo "${{ steps.meta.outputs.tags }}" + - name: "Hello world when it's Monday" + run: echo "${{ steps.meta.outputs.json }}" bff: name: Build BFF From 6043099473cf9720fa48b7cec6690c52eb3f354e Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 13:09:36 +0100 Subject: [PATCH 09/32] chore(build): test expressions for if 5 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b1491afa..6d24af2c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: steps: - run: echo "Hello world a" b: - if: false + if: true runs-on: ubuntu-latest steps: From 79c9962dc2d97d077920d2533b83f7172e356b7d Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 13:12:34 +0100 Subject: [PATCH 10/32] chore(build): moves tag determination do head workflow 4 Outputs from a workflow can't be used in another workflow. --- .github/workflows/client_develop.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index d2088e0a7..42c85380c 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -25,8 +25,8 @@ jobs: sep-tags: "," flavor: | latest=auto - prefix= "'" - suffix= "'" + prefix= ' + suffix= ' - name: "Hello " run: echo "${{ steps.meta.outputs.tags }}" - name: "Hello world when it's Monday" From c7c19af685444a371ed33bcf535b54fb11b1cb85 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 13:15:00 +0100 Subject: [PATCH 11/32] chore(build): moves tag determination do head workflow 5 Outputs from a workflow can't be used in another workflow. --- .github/workflows/client_develop.yml | 8 +------ .github/workflows/test.yml | 35 ---------------------------- 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 42c85380c..670d70a35 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -21,16 +21,10 @@ jobs: id: meta uses: docker/metadata-action@v3 with: - images: inoeg/iris-client-bff, inoeg/iris-client-frontend + images: inoeg/iris-client-bff,inoeg/iris-client-frontend sep-tags: "," - flavor: | - latest=auto - prefix= ' - suffix= ' - name: "Hello " run: echo "${{ steps.meta.outputs.tags }}" - - name: "Hello world when it's Monday" - run: echo "${{ steps.meta.outputs.json }}" bff: name: Build BFF diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 6d24af2c4..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Job Conditionals - -on: - workflow_dispatch: - push: - branches: - - chore/optimized_build - -jobs: - a: - if: true - runs-on: ubuntu-latest - - steps: - - run: echo "Hello world a" - b: - if: true - runs-on: ubuntu-latest - - steps: - - run: exit 1 - c: - if: false - runs-on: ubuntu-latest - - steps: - - run: echo "Hello world c" - - d: - needs: [a, b, c] - if: ${{ always() && contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') }} - runs-on: ubuntu-latest - - steps: - - run: echo "Hello world d" From 0c8d8a890cd2b0551831cda813a13a3f043be204 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 13:37:14 +0100 Subject: [PATCH 12/32] chore(build): test if for e2e --- .github/workflows/client_develop.yml | 23 ++++++++++++----------- .github/workflows/fe-e2e-test.yml | 3 ++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 670d70a35..5a1059c91 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -22,7 +22,7 @@ jobs: uses: docker/metadata-action@v3 with: images: inoeg/iris-client-bff,inoeg/iris-client-frontend - sep-tags: "," +# sep-tags: "," - name: "Hello " run: echo "${{ steps.meta.outputs.tags }}" @@ -51,10 +51,11 @@ jobs: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} -# e2e_test: -# name: Run E2E Tests -# needs: bff -# uses: iris-connect/iris-client/.github/workflows/fe-e2e-test.yml@chore/optimized_build + e2e_test: + name: Run E2E Tests + needs: [bff, fe] + if: ${{ always() && contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') }} + uses: iris-connect/iris-client/.github/workflows/fe-e2e-test.yml@chore/optimized_build container_scan: name: Container Scan @@ -63,9 +64,9 @@ jobs: with: image-refs: "[ 'inoeg/iris-client-bff:${{needs.determine_tag.outputs.image_tag}}', 'inoeg/iris-client-frontend:${{needs.determine_tag.outputs.image_tag}}' ]" - container_scan2: - name: Container Scan 2 - needs: [bff, fe] - uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop - with: - image-refs: "[ ${{needs.determine_tag.outputs.images}} ]" +# container_scan2: +# name: Container Scan 2 +# needs: [bff, fe] +# uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop +# with: +# image-refs: "[ ${{needs.determine_tag.outputs.images}} ]" diff --git a/.github/workflows/fe-e2e-test.yml b/.github/workflows/fe-e2e-test.yml index df0c3ea82..57fc5b075 100644 --- a/.github/workflows/fe-e2e-test.yml +++ b/.github/workflows/fe-e2e-test.yml @@ -29,7 +29,8 @@ jobs: cypress-run: name: Run Cypress E2E Tests needs: pre_job - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} +# if: ${{ always() && contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') }} +# || needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest steps: - name: Checkout From e4891f0b10575891f6d358fb910e4f7cb61b6d63 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 13:44:41 +0100 Subject: [PATCH 13/32] chore(build): moves tag determination do head workflow 6 Outputs from a workflow can't be used in another workflow. --- .github/workflows/client_develop.yml | 48 ++++------------------------ 1 file changed, 6 insertions(+), 42 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 5a1059c91..9db07d7b5 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -15,7 +15,7 @@ jobs: # Map a step output to a job output outputs: image_tag: ${{ steps.meta.outputs.version }} - images: ${{ steps.meta.outputs.tags }} + images: ${{ steps.meta.outputs.json }} steps: - name: Determines Image Tag id: meta @@ -25,48 +25,12 @@ jobs: # sep-tags: "," - name: "Hello " run: echo "${{ steps.meta.outputs.tags }}" + - name: "Hello 2" + run: echo "${{ toJSON(fromJSON(steps.meta.outputs.json).tags) }}" - bff: - name: Build BFF + container_scan2: + name: Container Scan 2 needs: determine_tag - uses: iris-connect/iris-client/.github/workflows/bff_develop.yml@chore/optimized_build - with: - image_tag: ${{needs.determine_tag.outputs.image_tag}} - secrets: - DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} - DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} - - publish-test-results: - name: Publish Test Results - needs: bff - uses: iris-connect/iris-client/.github/workflows/publish-test-results.yml@develop - - fe: - name: Build FE - needs: determine_tag - uses: iris-connect/iris-client/.github/workflows/fe_develop.yml@chore/optimized_build - with: - image_tag: ${{needs.determine_tag.outputs.image_tag}} - secrets: - DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} - DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} - - e2e_test: - name: Run E2E Tests - needs: [bff, fe] - if: ${{ always() && contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') }} - uses: iris-connect/iris-client/.github/workflows/fe-e2e-test.yml@chore/optimized_build - - container_scan: - name: Container Scan - needs: [bff, fe] uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop with: - image-refs: "[ 'inoeg/iris-client-bff:${{needs.determine_tag.outputs.image_tag}}', 'inoeg/iris-client-frontend:${{needs.determine_tag.outputs.image_tag}}' ]" - -# container_scan2: -# name: Container Scan 2 -# needs: [bff, fe] -# uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop -# with: -# image-refs: "[ ${{needs.determine_tag.outputs.images}} ]" + image-refs: ${{ toJSON(fromJSON(needs.determine_tag.outputs.images).tags) }} From a662ac2e88c4d23f4673308450a2361f7e007c4f Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 13:57:10 +0100 Subject: [PATCH 14/32] chore(build): moves tag determination do head workflow 7 Outputs from a workflow can't be used in another workflow. --- .github/workflows/client_develop.yml | 44 ++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 9db07d7b5..936803ec3 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -15,22 +15,48 @@ jobs: # Map a step output to a job output outputs: image_tag: ${{ steps.meta.outputs.version }} - images: ${{ steps.meta.outputs.json }} + image_json: ${{ steps.meta.outputs.json }} steps: - name: Determines Image Tag id: meta uses: docker/metadata-action@v3 with: images: inoeg/iris-client-bff,inoeg/iris-client-frontend -# sep-tags: "," - - name: "Hello " - run: echo "${{ steps.meta.outputs.tags }}" - - name: "Hello 2" - run: echo "${{ toJSON(fromJSON(steps.meta.outputs.json).tags) }}" - container_scan2: - name: Container Scan 2 + bff: + name: Build BFF needs: determine_tag + uses: iris-connect/iris-client/.github/workflows/bff_develop.yml@chore/optimized_build + with: + image_tag: ${{needs.determine_tag.outputs.image_tag}} + secrets: + DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} + DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} + + publish-test-results: + name: Publish Test Results + needs: bff + uses: iris-connect/iris-client/.github/workflows/publish-test-results.yml@develop + + fe: + name: Build FE + needs: determine_tag + uses: iris-connect/iris-client/.github/workflows/fe_develop.yml@chore/optimized_build + with: + image_tag: ${{needs.determine_tag.outputs.image_tag}} + secrets: + DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} + DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} + + e2e_test: + name: Run E2E Tests + needs: [bff, fe] + if: ${{ always() && contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') }} + uses: iris-connect/iris-client/.github/workflows/fe-e2e-test.yml@chore/optimized_build + + container_scan: + name: Container Scan + needs: [bff, fe] uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop with: - image-refs: ${{ toJSON(fromJSON(needs.determine_tag.outputs.images).tags) }} + image-refs: ${{ toJSON(fromJSON(needs.determine_tag.outputs.image_json).tags) }} From 71b67cc5e2ffb4204852dc6e4d1ca413f37a858b Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 14:06:58 +0100 Subject: [PATCH 15/32] chore(build): moves if condition to head workflow In sub workflow it has not effect. --- .github/workflows/client_develop.yml | 2 ++ .github/workflows/publish-test-results.yml | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 936803ec3..0430dc96d 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -36,6 +36,8 @@ jobs: publish-test-results: name: Publish Test Results needs: bff + # the previous job might be skipped, we don't need to run this job then + if: success() || failure() uses: iris-connect/iris-client/.github/workflows/publish-test-results.yml@develop fe: diff --git a/.github/workflows/publish-test-results.yml b/.github/workflows/publish-test-results.yml index b068eafc9..723c2af00 100644 --- a/.github/workflows/publish-test-results.yml +++ b/.github/workflows/publish-test-results.yml @@ -14,9 +14,6 @@ jobs: name: Download and Publish runs-on: ubuntu-latest - # the previous job might be skipped, we don't need to run this job then - if: success() || failure() - steps: - name: Download Artifact uses: actions/download-artifact@v2 From fbbe4df0370797c11b9315a35052623da69de8d5 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 14:15:08 +0100 Subject: [PATCH 16/32] chore(build): moves if condition to head workflow 2 In sub workflow it has not effect. --- .github/workflows/client_develop.yml | 38 ++++++++-------------------- 1 file changed, 10 insertions(+), 28 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 0430dc96d..3d6e8a920 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -33,32 +33,14 @@ jobs: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} - publish-test-results: - name: Publish Test Results + xxx: needs: bff - # the previous job might be skipped, we don't need to run this job then - if: success() || failure() - uses: iris-connect/iris-client/.github/workflows/publish-test-results.yml@develop - - fe: - name: Build FE - needs: determine_tag - uses: iris-connect/iris-client/.github/workflows/fe_develop.yml@chore/optimized_build - with: - image_tag: ${{needs.determine_tag.outputs.image_tag}} - secrets: - DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} - DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} - - e2e_test: - name: Run E2E Tests - needs: [bff, fe] - if: ${{ always() && contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') }} - uses: iris-connect/iris-client/.github/workflows/fe-e2e-test.yml@chore/optimized_build - - container_scan: - name: Container Scan - needs: [bff, fe] - uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop - with: - image-refs: ${{ toJSON(fromJSON(needs.determine_tag.outputs.image_json).tags) }} + runs-on: ubuntu-latest + steps: + - name: "Hello " + run: echo "${{ toJSON(needs) }}" + - name: "Hello 2" + run: echo "${{ join(needs.*.result, ', ') }}" + - name: "Hello 3" + run: echo "${{ needs }}" + From b5c6192050057ce53bb415028b4cc5dcbdfd7bf7 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 14:32:06 +0100 Subject: [PATCH 17/32] chore(build): moves pre jobs to head workflow --- .github/workflows/bff_develop.yml | 20 ------------------- .github/workflows/client_develop.yml | 30 +++++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/.github/workflows/bff_develop.yml b/.github/workflows/bff_develop.yml index 7dfb2a4f6..2e6238a5c 100644 --- a/.github/workflows/bff_develop.yml +++ b/.github/workflows/bff_develop.yml @@ -21,28 +21,8 @@ defaults: shell: bash jobs: - pre_job: - name: Determines job skipping - continue-on-error: true # Uncomment once integration is finished - runs-on: ubuntu-latest - # Map a step output to a job output - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@master - with: - # All of these options are optional, so you can remove them if you are happy with the defaults - skip_after_successful_duplicate: 'false' - concurrent_skipping: 'never' - cancel_others: 'true' - paths: '["iris-client-bff/**", ".github/workflows/bff_develop.yml"]' - paths_ignore: '["**/README.md", "**/docs/**", "**/postman/**"]' - build_and_push: name: Build and push to docker.io - needs: pre_job - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest steps: diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 3d6e8a920..12d5a8498 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -23,9 +23,28 @@ jobs: with: images: inoeg/iris-client-bff,inoeg/iris-client-frontend + skip_check_bff: + name: Determines BFF Job skipping + continue-on-error: true # Uncomment once integration is finished + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + # All of these options are optional, so you can remove them if you are happy with the defaults + skip_after_successful_duplicate: 'false' + concurrent_skipping: 'never' + cancel_others: 'true' + paths: '["iris-client-bff/**", ".github/workflows/bff_develop.yml"]' + paths_ignore: '["**/README.md", "**/docs/**", "**/postman/**"]' + bff: name: Build BFF - needs: determine_tag + needs: [determine_tag, skip_check_bff] + if: ${{ needs.skip_check_bff.outputs.should_skip != 'true' }} uses: iris-connect/iris-client/.github/workflows/bff_develop.yml@chore/optimized_build with: image_tag: ${{needs.determine_tag.outputs.image_tag}} @@ -41,6 +60,11 @@ jobs: run: echo "${{ toJSON(needs) }}" - name: "Hello 2" run: echo "${{ join(needs.*.result, ', ') }}" - - name: "Hello 3" - run: echo "${{ needs }}" + publish-test-results: + name: Publish Test Results + needs: bff + # the previous job might be skipped, we don't need to run this job then + if: success() || failure() + uses: iris-connect/iris-client/.github/workflows/publish-test-results.yml@develop + From 63f7e83bdd2a3038bb44109735de5957bd618af1 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 14:50:42 +0100 Subject: [PATCH 18/32] chore(build): moves pre jobs to head workflow 2 --- .github/workflows/client_develop.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 12d5a8498..b6ca8c8bb 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -58,8 +58,6 @@ jobs: steps: - name: "Hello " run: echo "${{ toJSON(needs) }}" - - name: "Hello 2" - run: echo "${{ join(needs.*.result, ', ') }}" publish-test-results: name: Publish Test Results From 210b76c507054e35f751d1440ded1d3efebe3111 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 14:57:03 +0100 Subject: [PATCH 19/32] chore(build): test run --- .github/workflows/client_develop.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index b6ca8c8bb..86e522fdb 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -38,8 +38,7 @@ jobs: skip_after_successful_duplicate: 'false' concurrent_skipping: 'never' cancel_others: 'true' - paths: '["iris-client-bff/**", ".github/workflows/bff_develop.yml"]' - paths_ignore: '["**/README.md", "**/docs/**", "**/postman/**"]' + paths: '["iris-client-bff/**", ".github/workflows/bff_develop.yml", "!**/README.md", "!**/Readme.md", "!**/docs/**", "!**/postman/**"]' bff: name: Build BFF From b6ec8b30e804b8060ddf4f88d3bc4c6907410a09 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 15:35:07 +0100 Subject: [PATCH 20/32] chore(build): test run 3 --- .github/workflows/client_develop.yml | 11 ++--------- iris-client-bff/Readme.md | 2 ++ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 86e522fdb..22d883f53 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -48,16 +48,9 @@ jobs: with: image_tag: ${{needs.determine_tag.outputs.image_tag}} secrets: - DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} - DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} + DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} + DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} - xxx: - needs: bff - runs-on: ubuntu-latest - steps: - - name: "Hello " - run: echo "${{ toJSON(needs) }}" - publish-test-results: name: Publish Test Results needs: bff diff --git a/iris-client-bff/Readme.md b/iris-client-bff/Readme.md index 1feb575a6..218082771 100644 --- a/iris-client-bff/Readme.md +++ b/iris-client-bff/Readme.md @@ -18,3 +18,5 @@ security.jwt.jwt-shared-secret=thissecretshouldbeusedfortestingpurposesonly ``` Using this setting, the authentication is activated for all calls towards the client need to be authorized. + +aaaa \ No newline at end of file From bbe62d345598f324adaaff38c7727a7c71b9b034 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 15:42:08 +0100 Subject: [PATCH 21/32] chore(build): test run 4 --- iris-client-bff/Readme.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/iris-client-bff/Readme.md b/iris-client-bff/Readme.md index 218082771..1feb575a6 100644 --- a/iris-client-bff/Readme.md +++ b/iris-client-bff/Readme.md @@ -18,5 +18,3 @@ security.jwt.jwt-shared-secret=thissecretshouldbeusedfortestingpurposesonly ``` Using this setting, the authentication is activated for all calls towards the client need to be authorized. - -aaaa \ No newline at end of file From fd6bd84ef15cb8768479a755c1f3b0d68ede3ceb Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 15:49:09 +0100 Subject: [PATCH 22/32] chore(build): test run 5 --- .github/workflows/client_develop.yml | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 22d883f53..a4e47e78d 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -38,23 +38,5 @@ jobs: skip_after_successful_duplicate: 'false' concurrent_skipping: 'never' cancel_others: 'true' - paths: '["iris-client-bff/**", ".github/workflows/bff_develop.yml", "!**/README.md", "!**/Readme.md", "!**/docs/**", "!**/postman/**"]' - - bff: - name: Build BFF - needs: [determine_tag, skip_check_bff] - if: ${{ needs.skip_check_bff.outputs.should_skip != 'true' }} - uses: iris-connect/iris-client/.github/workflows/bff_develop.yml@chore/optimized_build - with: - image_tag: ${{needs.determine_tag.outputs.image_tag}} - secrets: - DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} - DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} - - publish-test-results: - name: Publish Test Results - needs: bff - # the previous job might be skipped, we don't need to run this job then - if: success() || failure() - uses: iris-connect/iris-client/.github/workflows/publish-test-results.yml@develop - + paths: '[".github/workflows/bff_develop.yml", "iris-client-bff/**", "!**/Readme.md"]' + \ No newline at end of file From ba6c6c8d51c249c1a9d3bf623e7c053af510a907 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 15:53:22 +0100 Subject: [PATCH 23/32] chore(build): test run 6 --- .github/workflows/client_develop.yml | 2 +- iris-client-bff/Readme.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index a4e47e78d..6baaf270a 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -38,5 +38,5 @@ jobs: skip_after_successful_duplicate: 'false' concurrent_skipping: 'never' cancel_others: 'true' - paths: '[".github/workflows/bff_develop.yml", "iris-client-bff/**", "!**/Readme.md"]' + paths: '["!**/Readme.md", "iris-client-bff/**", ".github/workflows/bff_develop.yml"]' \ No newline at end of file diff --git a/iris-client-bff/Readme.md b/iris-client-bff/Readme.md index 1feb575a6..7d4f6ac6c 100644 --- a/iris-client-bff/Readme.md +++ b/iris-client-bff/Readme.md @@ -18,3 +18,5 @@ security.jwt.jwt-shared-secret=thissecretshouldbeusedfortestingpurposesonly ``` Using this setting, the authentication is activated for all calls towards the client need to be authorized. + +aaa \ No newline at end of file From 79524b283e31184947db76fecdc33b306e57b2a6 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Tue, 9 Nov 2021 15:58:05 +0100 Subject: [PATCH 24/32] chore(build): test run 7 --- .github/workflows/client_develop.yml | 2 +- iris-client-bff/Readme.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 6baaf270a..fb35a2486 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -38,5 +38,5 @@ jobs: skip_after_successful_duplicate: 'false' concurrent_skipping: 'never' cancel_others: 'true' - paths: '["!**/Readme.md", "iris-client-bff/**", ".github/workflows/bff_develop.yml"]' + paths: '["iris-client-bff/**", "!iris-client-bff/Readme.md", ".github/workflows/bff_develop.yml"]' \ No newline at end of file diff --git a/iris-client-bff/Readme.md b/iris-client-bff/Readme.md index 7d4f6ac6c..efa5a36a6 100644 --- a/iris-client-bff/Readme.md +++ b/iris-client-bff/Readme.md @@ -19,4 +19,4 @@ security.jwt.jwt-shared-secret=thissecretshouldbeusedfortestingpurposesonly Using this setting, the authentication is activated for all calls towards the client need to be authorized. -aaa \ No newline at end of file +a \ No newline at end of file From 658a76598c085e7fa773440ba5eaf1117a35348d Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Wed, 10 Nov 2021 09:12:41 +0100 Subject: [PATCH 25/32] chore(build): moves pre jobs to head workflow for FEr --- .github/workflows/client_develop.yml | 60 +++++++++++++++++++++++++++- .github/workflows/fe_develop.yml | 20 ---------- iris-client-bff/Readme.md | 2 - 3 files changed, 58 insertions(+), 24 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index fb35a2486..7d0540c09 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -38,5 +38,61 @@ jobs: skip_after_successful_duplicate: 'false' concurrent_skipping: 'never' cancel_others: 'true' - paths: '["iris-client-bff/**", "!iris-client-bff/Readme.md", ".github/workflows/bff_develop.yml"]' - \ No newline at end of file + paths: '[".github/workflows/bff_develop.yml", "iris-client-bff/**", "!**/README.md", "!**/Readme.md", "!**/docs/**", "!**/postman/**"]' + + skip_check_fe: + name: Determines FE Job skipping + continue-on-error: true + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + skip_after_successful_duplicate: 'false' + concurrent_skipping: 'never' + cancel_others: 'true' + paths: '[".github/workflows/fe_develop.yml", "iris-client-fe/**", "!**/README.md", "!**/Readme.md", "!**/docs/**", "!**/postman/**"]' + + bff: + name: Build BFF + needs: [determine_tag, skip_check_bff] + if: ${{ needs.skip_check_bff.outputs.should_skip != 'true' }} + uses: iris-connect/iris-client/.github/workflows/bff_develop.yml@chore/optimized_build + with: + image_tag: ${{needs.determine_tag.outputs.image_tag}} + secrets: + DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} + DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} + + publish-test-results: + name: Publish Test Results + needs: bff + # the previous job might be skipped, we don't need to run this job then + if: success() || failure() + uses: iris-connect/iris-client/.github/workflows/publish-test-results.yml@develop + + fe: + name: Build FE + needs: [determine_tag, skip_check_fe] + if: ${{ needs.skip_check_fe.outputs.should_skip != 'true' }} + uses: iris-connect/iris-client/.github/workflows/fe_develop.yml@chore/optimized_build + with: + image_tag: ${{needs.determine_tag.outputs.image_tag}} + secrets: + DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} + DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} + + e2e_test: + name: Run E2E Tests + needs: [bff, fe] + if: ${{ always() && contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') }} + uses: iris-connect/iris-client/.github/workflows/fe-e2e-test.yml@chore/optimized_build + + container_scan: + name: Container Scan + needs: [bff, fe] + uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop + with: + image-refs: ${{ toJSON(fromJSON(needs.determine_tag.outputs.image_json).tags) }} diff --git a/.github/workflows/fe_develop.yml b/.github/workflows/fe_develop.yml index 184d30ecf..f3e6e4035 100644 --- a/.github/workflows/fe_develop.yml +++ b/.github/workflows/fe_develop.yml @@ -14,28 +14,8 @@ on: required: true jobs: - pre_job: - name: Determines job skipping - continue-on-error: true # Uncomment once integration is finished - runs-on: ubuntu-latest - # Map a step output to a job output - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@master - with: - # All of these options are optional, so you can remove them if you are happy with the defaults - skip_after_successful_duplicate: 'false' - concurrent_skipping: 'never' - cancel_others: 'true' - paths: '["iris-client-fe/**", ".github/workflows/fe_develop.yml"]' - paths_ignore: '["**/README.md", "**/docs/**", "**/postman/**"]' - build_and_push: name: Build and push to docker.io - needs: pre_job - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest env: diff --git a/iris-client-bff/Readme.md b/iris-client-bff/Readme.md index efa5a36a6..1feb575a6 100644 --- a/iris-client-bff/Readme.md +++ b/iris-client-bff/Readme.md @@ -18,5 +18,3 @@ security.jwt.jwt-shared-secret=thissecretshouldbeusedfortestingpurposesonly ``` Using this setting, the authentication is activated for all calls towards the client need to be authorized. - -a \ No newline at end of file From 700c6b5e7e50cc1a761f7b3da16e6711a0a8bf20 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Fri, 19 Nov 2021 16:07:08 +0100 Subject: [PATCH 26/32] chore: test for edit tag array --- .github/workflows/client_develop.yml | 54 ++++++++++++++++----------- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/trivy-repo-scan.yml | 5 +++ 3 files changed, 39 insertions(+), 22 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 7d0540c09..f56a9dcaf 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -7,6 +7,7 @@ on: pull_request: branches: - develop + - main jobs: determine_tag: @@ -23,42 +24,53 @@ jobs: with: images: inoeg/iris-client-bff,inoeg/iris-client-frontend - skip_check_bff: - name: Determines BFF Job skipping + skip_check: + name: Determines Job skipping continue-on-error: true # Uncomment once integration is finished runs-on: ubuntu-latest # Map a step output to a job output outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} + should_skip_bff: ${{ steps.skip_check_bff.outputs.should_skip }} + should_skip_fe: ${{ steps.skip_check_fe.outputs.should_skip }} steps: - - id: skip_check + - id: skip_check_bff + name: Skip Check BFF uses: fkirc/skip-duplicate-actions@master with: # All of these options are optional, so you can remove them if you are happy with the defaults skip_after_successful_duplicate: 'false' - concurrent_skipping: 'never' cancel_others: 'true' - paths: '[".github/workflows/bff_develop.yml", "iris-client-bff/**", "!**/README.md", "!**/Readme.md", "!**/docs/**", "!**/postman/**"]' - - skip_check_fe: - name: Determines FE Job skipping - continue-on-error: true - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check + paths_ignore: '["**/README.md", "**/Readme.md", "**/docs/**", "**/postman/**"]' + paths: '[".github/workflows/bff_develop.yml", "iris-client-bff/**"]' + + - id: skip_check_fe + name: Skip Check FE uses: fkirc/skip-duplicate-actions@master with: skip_after_successful_duplicate: 'false' - concurrent_skipping: 'never' cancel_others: 'true' - paths: '[".github/workflows/fe_develop.yml", "iris-client-fe/**", "!**/README.md", "!**/Readme.md", "!**/docs/**", "!**/postman/**"]' + paths_ignore: '["**/README.md", "**/Readme.md", "**/docs/**", "**/postman/**"]' + paths: '[".github/workflows/fe_develop.yml", "iris-client-fe/**"]' + + test: + name: Test + needs: [determine_tag, skip_check] + runs-on: ubuntu-latest + steps: + - name: Output + run: | + echo $SKIP_BFF + echo $IMAGE_JSON + echo $IMAGE_OBJ + env: + SKIP_BFF: ${{ needs.skip_check.outputs.should_skip_bff }} + IMAGE_JSON: ${{ needs.determine_tag.outputs.image_json }} + IMAGE_OBJ: ${{ fromJSON(needs.determine_tag.outputs.image_json).tags }} bff: name: Build BFF - needs: [determine_tag, skip_check_bff] - if: ${{ needs.skip_check_bff.outputs.should_skip != 'true' }} + needs: [determine_tag, skip_check] + if: ${{ needs.skip_check.outputs.should_skip_bff != 'true' }} uses: iris-connect/iris-client/.github/workflows/bff_develop.yml@chore/optimized_build with: image_tag: ${{needs.determine_tag.outputs.image_tag}} @@ -75,8 +87,8 @@ jobs: fe: name: Build FE - needs: [determine_tag, skip_check_fe] - if: ${{ needs.skip_check_fe.outputs.should_skip != 'true' }} + needs: [determine_tag, skip_check] + if: ${{ needs.skip_check_fe.outputs.should_skip_fe != 'true' }} uses: iris-connect/iris-client/.github/workflows/fe_develop.yml@chore/optimized_build with: image_tag: ${{needs.determine_tag.outputs.image_tag}} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a8f16a815..bb44ffdfa 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,4 +1,4 @@ -name: "CodeQL" +name: CodeQL on: push: diff --git a/.github/workflows/trivy-repo-scan.yml b/.github/workflows/trivy-repo-scan.yml index 765e90e15..868291fcb 100644 --- a/.github/workflows/trivy-repo-scan.yml +++ b/.github/workflows/trivy-repo-scan.yml @@ -12,6 +12,11 @@ jobs: repo_scan: name: Trivy Repo Scan runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + steps: - name: Checkout code uses: actions/checkout@v2.4.0 From 23a0d30471f92e17c467dfa5815b9bb4562cadab Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Fri, 19 Nov 2021 16:21:17 +0100 Subject: [PATCH 27/32] chore: test for edit tag array 2 --- .github/workflows/client_develop.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index f56a9dcaf..3334ece91 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -65,7 +65,7 @@ jobs: env: SKIP_BFF: ${{ needs.skip_check.outputs.should_skip_bff }} IMAGE_JSON: ${{ needs.determine_tag.outputs.image_json }} - IMAGE_OBJ: ${{ fromJSON(needs.determine_tag.outputs.image_json).tags }} + IMAGE_OBJ: ${{ fromJSON(needs.determine_tag.outputs.image_json) }} bff: name: Build BFF @@ -104,7 +104,7 @@ jobs: container_scan: name: Container Scan - needs: [bff, fe] + needs: [determine_tag, bff, fe] uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop with: image-refs: ${{ toJSON(fromJSON(needs.determine_tag.outputs.image_json).tags) }} From 8aa93a1ee54b62ff8acdd9952c27b16a0756dad7 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Fri, 19 Nov 2021 16:22:36 +0100 Subject: [PATCH 28/32] chore: test for edit tag array 3 --- .github/workflows/client_develop.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 3334ece91..95955322a 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -61,11 +61,9 @@ jobs: run: | echo $SKIP_BFF echo $IMAGE_JSON - echo $IMAGE_OBJ env: SKIP_BFF: ${{ needs.skip_check.outputs.should_skip_bff }} IMAGE_JSON: ${{ needs.determine_tag.outputs.image_json }} - IMAGE_OBJ: ${{ fromJSON(needs.determine_tag.outputs.image_json) }} bff: name: Build BFF From 6d0d3ad5db1e4ea4824ad93b9a3b21dfeece00bb Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Fri, 19 Nov 2021 16:49:31 +0100 Subject: [PATCH 29/32] chore: test for edit tag array 4 --- .github/workflows/client_develop.yml | 77 ++++++++++++++++------------ 1 file changed, 44 insertions(+), 33 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 95955322a..c7c4d713b 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -10,20 +10,6 @@ on: - main jobs: - determine_tag: - name: Determines Image Tag - runs-on: ubuntu-latest - # Map a step output to a job output - outputs: - image_tag: ${{ steps.meta.outputs.version }} - image_json: ${{ steps.meta.outputs.json }} - steps: - - name: Determines Image Tag - id: meta - uses: docker/metadata-action@v3 - with: - images: inoeg/iris-client-bff,inoeg/iris-client-frontend - skip_check: name: Determines Job skipping continue-on-error: true # Uncomment once integration is finished @@ -52,22 +38,46 @@ jobs: paths_ignore: '["**/README.md", "**/Readme.md", "**/docs/**", "**/postman/**"]' paths: '[".github/workflows/fe_develop.yml", "iris-client-fe/**"]' - test: - name: Test - needs: [determine_tag, skip_check] + determine_images: + name: Determines Relevant Images + needs: skip_check runs-on: ubuntu-latest + outputs: + images: ${{ env.IMAGES }} steps: - - name: Output + - id: step + name: Determines Relevant Images run: | - echo $SKIP_BFF - echo $IMAGE_JSON - env: - SKIP_BFF: ${{ needs.skip_check.outputs.should_skip_bff }} - IMAGE_JSON: ${{ needs.determine_tag.outputs.image_json }} + declare -a image_array + + if [ ${{ needs.skip_check.outputs.should_skip_bff }} != 'true' ]; then + image_array+=(inoeg/iris-client-bff) + fi + if [ ${{ needs.skip_check.outputs.should_skip_fe }} != 'true' ]; then + image_array+=(inoeg/iris-client-frontend) + fi + + echo "IMAGES=$(IFS=,; echo "${image_array[*]}")" >> $GITHUB_ENV +# echo "tags=$(echo $IMAGE_JSON | jq -c '[.tags[] | select(test("bff|fr"))]')" >> $GITHUB_ENV + determine_tag: + name: Determines Image Tag + needs: determine_images + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + image_tag: ${{ steps.step.outputs.version }} + image_json: ${{ steps.step.outputs.json }} + steps: + - name: Determines Image Tag + id: step + uses: docker/metadata-action@v3 + with: + images: ${{needs.determine_images.outputs.images}} + bff: name: Build BFF - needs: [determine_tag, skip_check] + needs: [skip_check, determine_tag] if: ${{ needs.skip_check.outputs.should_skip_bff != 'true' }} uses: iris-connect/iris-client/.github/workflows/bff_develop.yml@chore/optimized_build with: @@ -81,12 +91,12 @@ jobs: needs: bff # the previous job might be skipped, we don't need to run this job then if: success() || failure() - uses: iris-connect/iris-client/.github/workflows/publish-test-results.yml@develop + uses: iris-connect/iris-client/.github/workflows/publish-test-results.yml@chore/optimized_build fe: name: Build FE - needs: [determine_tag, skip_check] - if: ${{ needs.skip_check_fe.outputs.should_skip_fe != 'true' }} + needs: [skip_check, determine_tag] + if: ${{ needs.skip_check.outputs.should_skip_fe != 'true' }} uses: iris-connect/iris-client/.github/workflows/fe_develop.yml@chore/optimized_build with: image_tag: ${{needs.determine_tag.outputs.image_tag}} @@ -94,15 +104,16 @@ jobs: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} - e2e_test: - name: Run E2E Tests - needs: [bff, fe] - if: ${{ always() && contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') }} - uses: iris-connect/iris-client/.github/workflows/fe-e2e-test.yml@chore/optimized_build +# e2e_test: +# name: Run E2E Tests +# needs: [bff, fe] +# if: ${{ !failure() && !cancelled() && (success('bff') || success('fe')) }} +# uses: iris-connect/iris-client/.github/workflows/fe-e2e-test.yml@chore/optimized_build container_scan: name: Container Scan needs: [determine_tag, bff, fe] - uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop + if: ${{ !failure() && !cancelled() }} + uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@chore/optimized_build with: image-refs: ${{ toJSON(fromJSON(needs.determine_tag.outputs.image_json).tags) }} From f8bdb2d34704d53d921251f0e8f09c16a1c30c64 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Fri, 19 Nov 2021 23:24:57 +0100 Subject: [PATCH 30/32] chore: test for edit tag array 5 --- .github/workflows/client_develop.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index c7c4d713b..6d51a01b3 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -104,11 +104,11 @@ jobs: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} -# e2e_test: -# name: Run E2E Tests -# needs: [bff, fe] -# if: ${{ !failure() && !cancelled() && (success('bff') || success('fe')) }} -# uses: iris-connect/iris-client/.github/workflows/fe-e2e-test.yml@chore/optimized_build + e2e_test: + name: Run E2E Tests + needs: [bff, fe] + if: ${{ !failure() && !cancelled() && (success('bff') || success('fe')) }} + uses: iris-connect/iris-client/.github/workflows/fe-e2e-test.yml@chore/optimized_build container_scan: name: Container Scan From f88b5a85964c5fa87710884eef0d5bc4dbbba210 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Fri, 19 Nov 2021 23:35:18 +0100 Subject: [PATCH 31/32] chore: test for edit tag array 6 --- .github/workflows/client_develop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index 6d51a01b3..f80f555b9 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -63,6 +63,7 @@ jobs: determine_tag: name: Determines Image Tag needs: determine_images + if: ${{ needs.determine_images.outputs.images != '' }} runs-on: ubuntu-latest # Map a step output to a job output outputs: From 60c3c2212e9b369afb6a9f4bef1e4e205de86705 Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Sat, 20 Nov 2021 07:53:51 +0100 Subject: [PATCH 32/32] chore: sets prefix to sub-workflows to clarify their difference --- .github/workflows/app-eps_develop.yml | 2 +- .github/workflows/client_develop.yml | 17 ++++++++++------- .github/workflows/iris-client-eps_develop.yml | 2 +- .github/workflows/iris-client-proxy_develop.yml | 2 +- .github/workflows/nginx_develop.yml | 2 +- .github/workflows/release-gitflow.yml | 13 +++++++------ .../{bff_develop.yml => sub.bff_develop.yml} | 4 ---- .../{fe-e2e-test.yml => sub.fe-e2e-test.yml} | 5 ----- .../{fe_develop.yml => sub.fe_develop.yml} | 0 ...results.yml => sub.publish-test-results.yml} | 0 ...er-scan.yml => sub.trivy-container-scan.yml} | 0 11 files changed, 21 insertions(+), 26 deletions(-) rename .github/workflows/{bff_develop.yml => sub.bff_develop.yml} (97%) rename .github/workflows/{fe-e2e-test.yml => sub.fe-e2e-test.yml} (97%) rename .github/workflows/{fe_develop.yml => sub.fe_develop.yml} (100%) rename .github/workflows/{publish-test-results.yml => sub.publish-test-results.yml} (100%) rename .github/workflows/{trivy-container-scan.yml => sub.trivy-container-scan.yml} (100%) diff --git a/.github/workflows/app-eps_develop.yml b/.github/workflows/app-eps_develop.yml index a303a9ee7..653f15b2d 100644 --- a/.github/workflows/app-eps_develop.yml +++ b/.github/workflows/app-eps_develop.yml @@ -56,6 +56,6 @@ jobs: container_scan: name: Container Scan needs: build_and_push - uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop + uses: iris-connect/iris-client/.github/workflows/sub.trivy-container-scan.yml@develop with: image-refs: "[ '${{needs.build_and_push.outputs.image-ref}}' ]" diff --git a/.github/workflows/client_develop.yml b/.github/workflows/client_develop.yml index f80f555b9..34f643227 100644 --- a/.github/workflows/client_develop.yml +++ b/.github/workflows/client_develop.yml @@ -27,7 +27,7 @@ jobs: skip_after_successful_duplicate: 'false' cancel_others: 'true' paths_ignore: '["**/README.md", "**/Readme.md", "**/docs/**", "**/postman/**"]' - paths: '[".github/workflows/bff_develop.yml", "iris-client-bff/**"]' + paths: '[".github/workflows/sub.bff_develop.yml", "iris-client-bff/**"]' - id: skip_check_fe name: Skip Check FE @@ -36,7 +36,7 @@ jobs: skip_after_successful_duplicate: 'false' cancel_others: 'true' paths_ignore: '["**/README.md", "**/Readme.md", "**/docs/**", "**/postman/**"]' - paths: '[".github/workflows/fe_develop.yml", "iris-client-fe/**"]' + paths: '[".github/workflows/sub.fe_develop.yml", "iris-client-fe/**"]' determine_images: name: Determines Relevant Images @@ -80,7 +80,7 @@ jobs: name: Build BFF needs: [skip_check, determine_tag] if: ${{ needs.skip_check.outputs.should_skip_bff != 'true' }} - uses: iris-connect/iris-client/.github/workflows/bff_develop.yml@chore/optimized_build + uses: iris-connect/iris-client/.github/workflows/sub.bff_develop.yml@chore/optimized_build with: image_tag: ${{needs.determine_tag.outputs.image_tag}} secrets: @@ -92,13 +92,13 @@ jobs: needs: bff # the previous job might be skipped, we don't need to run this job then if: success() || failure() - uses: iris-connect/iris-client/.github/workflows/publish-test-results.yml@chore/optimized_build + uses: iris-connect/iris-client/.github/workflows/sub.publish-test-results.yml@chore/optimized_build fe: name: Build FE needs: [skip_check, determine_tag] if: ${{ needs.skip_check.outputs.should_skip_fe != 'true' }} - uses: iris-connect/iris-client/.github/workflows/fe_develop.yml@chore/optimized_build + uses: iris-connect/iris-client/.github/workflows/sub.fe_develop.yml@chore/optimized_build with: image_tag: ${{needs.determine_tag.outputs.image_tag}} secrets: @@ -109,12 +109,15 @@ jobs: name: Run E2E Tests needs: [bff, fe] if: ${{ !failure() && !cancelled() && (success('bff') || success('fe')) }} - uses: iris-connect/iris-client/.github/workflows/fe-e2e-test.yml@chore/optimized_build +# if: ${{ always() && contains(needs.*.result, 'success') && !(contains(needs.*.result, 'failure')) }} +# from: https://github.community/t/run-a-job-if-at-least-one-of-the-previous-ones-succeeded/163777/2 +# Does not work! See also for the solution above: https://github.com/actions/runner/issues/491 + uses: iris-connect/iris-client/.github/workflows/sub.fe-e2e-test.yml@chore/optimized_build container_scan: name: Container Scan needs: [determine_tag, bff, fe] if: ${{ !failure() && !cancelled() }} - uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@chore/optimized_build + uses: iris-connect/iris-client/.github/workflows/sub.trivy-container-scan.yml@chore/optimized_build with: image-refs: ${{ toJSON(fromJSON(needs.determine_tag.outputs.image_json).tags) }} diff --git a/.github/workflows/iris-client-eps_develop.yml b/.github/workflows/iris-client-eps_develop.yml index b6d3dd50b..bd6ec66da 100644 --- a/.github/workflows/iris-client-eps_develop.yml +++ b/.github/workflows/iris-client-eps_develop.yml @@ -56,6 +56,6 @@ jobs: container_scan: name: Container Scan needs: build_and_push - uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop + uses: iris-connect/iris-client/.github/workflows/sub.trivy-container-scan.yml@develop with: image-refs: "[ '${{needs.build_and_push.outputs.image-ref}}' ]" diff --git a/.github/workflows/iris-client-proxy_develop.yml b/.github/workflows/iris-client-proxy_develop.yml index e0c0397d7..4bd1a4d9d 100644 --- a/.github/workflows/iris-client-proxy_develop.yml +++ b/.github/workflows/iris-client-proxy_develop.yml @@ -56,6 +56,6 @@ jobs: container_scan: name: Container Scan needs: build_and_push - uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop + uses: iris-connect/iris-client/.github/workflows/sub.trivy-container-scan.yml@develop with: image-refs: "[ '${{needs.build_and_push.outputs.image-ref}}' ]" diff --git a/.github/workflows/nginx_develop.yml b/.github/workflows/nginx_develop.yml index 410888460..7740bc2c2 100644 --- a/.github/workflows/nginx_develop.yml +++ b/.github/workflows/nginx_develop.yml @@ -57,6 +57,6 @@ jobs: container_scan: name: Container Scan needs: build_and_push - uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop + uses: iris-connect/iris-client/.github/workflows/sub.trivy-container-scan.yml@develop with: image-refs: "[ '${{needs.build_and_push.outputs.image-ref}}' ]" diff --git a/.github/workflows/release-gitflow.yml b/.github/workflows/release-gitflow.yml index c35bc8e8c..b5a065f2f 100644 --- a/.github/workflows/release-gitflow.yml +++ b/.github/workflows/release-gitflow.yml @@ -10,10 +10,6 @@ on: - next - next-major - 1.** - -defaults: - run: - shell: bash jobs: release-client: @@ -82,11 +78,16 @@ jobs: publish-test-results: name: Publish Test Results needs: release-client - uses: iris-connect/iris-client/.github/workflows/publish-test-results.yml@develop + uses: iris-connect/iris-client/.github/workflows/sub.publish-test-results.yml@develop + + e2e_test: + name: Run E2E Tests + needs: release-client + uses: iris-connect/iris-client/.github/workflows/sub.fe-e2e-test.yml@chore/optimized_build container_scan: name: Container Scan needs: release-client - uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop + uses: iris-connect/iris-client/.github/workflows/sub.trivy-container-scan.yml@develop with: image-refs: "[ 'inoeg/iris-client-bff:latest', 'inoeg/iris-client-frontend:latest', 'inoeg/iris-client-nginx:latest', 'inoeg/iris-client-eps:latest', 'inoeg/iris-client-proxy:latest', 'inoeg/app-eps:latest']" diff --git a/.github/workflows/bff_develop.yml b/.github/workflows/sub.bff_develop.yml similarity index 97% rename from .github/workflows/bff_develop.yml rename to .github/workflows/sub.bff_develop.yml index 2e6238a5c..2178d7299 100644 --- a/.github/workflows/bff_develop.yml +++ b/.github/workflows/sub.bff_develop.yml @@ -16,10 +16,6 @@ on: DOCKER_HUB_PW: required: true -defaults: - run: - shell: bash - jobs: build_and_push: name: Build and push to docker.io diff --git a/.github/workflows/fe-e2e-test.yml b/.github/workflows/sub.fe-e2e-test.yml similarity index 97% rename from .github/workflows/fe-e2e-test.yml rename to .github/workflows/sub.fe-e2e-test.yml index 57fc5b075..08e999cfc 100644 --- a/.github/workflows/fe-e2e-test.yml +++ b/.github/workflows/sub.fe-e2e-test.yml @@ -1,11 +1,6 @@ name: FE e2e Test on: - push: - branches: - - main - - release - - 1.** workflow_call: jobs: diff --git a/.github/workflows/fe_develop.yml b/.github/workflows/sub.fe_develop.yml similarity index 100% rename from .github/workflows/fe_develop.yml rename to .github/workflows/sub.fe_develop.yml diff --git a/.github/workflows/publish-test-results.yml b/.github/workflows/sub.publish-test-results.yml similarity index 100% rename from .github/workflows/publish-test-results.yml rename to .github/workflows/sub.publish-test-results.yml diff --git a/.github/workflows/trivy-container-scan.yml b/.github/workflows/sub.trivy-container-scan.yml similarity index 100% rename from .github/workflows/trivy-container-scan.yml rename to .github/workflows/sub.trivy-container-scan.yml