From d00c63a67b48f0738a3d5cad97ff7625724b871b Mon Sep 17 00:00:00 2001 From: Jens Kutzsche Date: Sat, 20 Nov 2021 07:53:51 +0100 Subject: [PATCH] chore: moves sub-workflows to a sub-folder --- .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 | 4 ++-- .github/workflows/{ => subs}/bff_develop.yml | 0 .github/workflows/{ => subs}/fe-e2e-test.yml | 5 ----- .github/workflows/{ => subs}/fe_develop.yml | 0 .../{ => subs}/publish-test-results.yml | 0 .../{ => subs}/trivy-container-scan.yml | 0 11 files changed, 16 insertions(+), 18 deletions(-) rename .github/workflows/{ => subs}/bff_develop.yml (100%) rename .github/workflows/{ => subs}/fe-e2e-test.yml (97%) rename .github/workflows/{ => subs}/fe_develop.yml (100%) rename .github/workflows/{ => subs}/publish-test-results.yml (100%) rename .github/workflows/{ => subs}/trivy-container-scan.yml (100%) diff --git a/.github/workflows/app-eps_develop.yml b/.github/workflows/app-eps_develop.yml index a303a9ee7..b8c419db5 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/subs/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..c2625d589 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/subs/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/subs/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/subs/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/subs/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/subs/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/subs/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/subs/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..5aef9d646 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/subs/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..88962ff8e 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/subs/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..d5df19fd8 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/subs/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..5cc0d956f 100644 --- a/.github/workflows/release-gitflow.yml +++ b/.github/workflows/release-gitflow.yml @@ -82,11 +82,11 @@ 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/subs/publish-test-results.yml@develop 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/subs/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/subs/bff_develop.yml similarity index 100% rename from .github/workflows/bff_develop.yml rename to .github/workflows/subs/bff_develop.yml diff --git a/.github/workflows/fe-e2e-test.yml b/.github/workflows/subs/fe-e2e-test.yml similarity index 97% rename from .github/workflows/fe-e2e-test.yml rename to .github/workflows/subs/fe-e2e-test.yml index 57fc5b075..08e999cfc 100644 --- a/.github/workflows/fe-e2e-test.yml +++ b/.github/workflows/subs/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/subs/fe_develop.yml similarity index 100% rename from .github/workflows/fe_develop.yml rename to .github/workflows/subs/fe_develop.yml diff --git a/.github/workflows/publish-test-results.yml b/.github/workflows/subs/publish-test-results.yml similarity index 100% rename from .github/workflows/publish-test-results.yml rename to .github/workflows/subs/publish-test-results.yml diff --git a/.github/workflows/trivy-container-scan.yml b/.github/workflows/subs/trivy-container-scan.yml similarity index 100% rename from .github/workflows/trivy-container-scan.yml rename to .github/workflows/subs/trivy-container-scan.yml