From 573ba2a6d2d97245ae92f2c5c94d88f2e0664dc4 Mon Sep 17 00:00:00 2001 From: dekiel Date: Wed, 16 Oct 2024 13:37:34 +0200 Subject: [PATCH 1/7] testing dependency --- .github/workflows/test-failed-job.yml | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/test-failed-job.yml diff --git a/.github/workflows/test-failed-job.yml b/.github/workflows/test-failed-job.yml new file mode 100644 index 000000000000..067fe22c5562 --- /dev/null +++ b/.github/workflows/test-failed-job.yml @@ -0,0 +1,36 @@ +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + failed-job: + runs-on: ubuntu-latest + outputs: + output1: ${{ steps.step1.outputs.test }} + steps: + - name: failed-step-with-output + run: | + echo "This job will always fail" + echo "test=hello" >> "$GITHUB_OUTPUT" + exit 1 + + dependent-job: + runs-on: ubuntu-latest + needs: failed-job + if: ${{ always() }} + steps: + - name: dependent-step + run: echo "This job is dependent on failed-job" + + dependent-job-2: + runs-on: ubuntu-latest + needs: failed-job + if: ${{ always() }} + steps: + - name: dependent-step + if: ${{ needs.failed-job.outputs.output1 == 'hello' }} + run: echo "This job is dependent on failed-job" \ No newline at end of file From 40f55f6da7dd2fba8bd85204ed125bdea94706e8 Mon Sep 17 00:00:00 2001 From: Przemek Pokrywka <12400578+dekiel@users.noreply.github.com> Date: Wed, 16 Oct 2024 14:09:30 +0200 Subject: [PATCH 2/7] Update test-failed-job.yml --- .github/workflows/test-failed-job.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-failed-job.yml b/.github/workflows/test-failed-job.yml index 067fe22c5562..cf5a4f492c3b 100644 --- a/.github/workflows/test-failed-job.yml +++ b/.github/workflows/test-failed-job.yml @@ -33,4 +33,12 @@ jobs: steps: - name: dependent-step if: ${{ needs.failed-job.outputs.output1 == 'hello' }} - run: echo "This job is dependent on failed-job" \ No newline at end of file + run: echo "This job is dependent on failed-job" + + dependent-job-3: + runs-on: ubuntu-latest + needs: failed-job + if: ${{ always() && needs.failed-job.outputs.output1 == 'hello' }} + steps: + - name: dependent-step + run: echo "This job is dependent on failed-job" From 658bfb32456c10f65cd43cec1ed7c4703169e3b9 Mon Sep 17 00:00:00 2001 From: Przemek Pokrywka <12400578+dekiel@users.noreply.github.com> Date: Wed, 16 Oct 2024 15:46:53 +0200 Subject: [PATCH 3/7] Update test-failed-job.yml --- .github/workflows/test-failed-job.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/test-failed-job.yml b/.github/workflows/test-failed-job.yml index cf5a4f492c3b..7514c76af01a 100644 --- a/.github/workflows/test-failed-job.yml +++ b/.github/workflows/test-failed-job.yml @@ -42,3 +42,16 @@ jobs: steps: - name: dependent-step run: echo "This job is dependent on failed-job" + + dependent-job-4: + runs-on: ubuntu-latest + needs: failed-job + if: ${{ (always() && needs.failed-job.outputs.output1 == 'hello') || failure() }} + steps: + - name: dependent-step + if: ${{ failure() }} + run: | + echo "This job should fail" + exit 1 + - name: this-not-fail + run: echo "do not fail" From e5bbad26d198e1d31f1aa84d9794c20192f88d0e Mon Sep 17 00:00:00 2001 From: Przemek Pokrywka <12400578+dekiel@users.noreply.github.com> Date: Wed, 16 Oct 2024 16:16:14 +0200 Subject: [PATCH 4/7] Update test-failed-job.yml --- .github/workflows/test-failed-job.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-failed-job.yml b/.github/workflows/test-failed-job.yml index 7514c76af01a..8a649279c43e 100644 --- a/.github/workflows/test-failed-job.yml +++ b/.github/workflows/test-failed-job.yml @@ -46,10 +46,10 @@ jobs: dependent-job-4: runs-on: ubuntu-latest needs: failed-job - if: ${{ (always() && needs.failed-job.outputs.output1 == 'hello') || failure() }} + if: ${{ (always() }} steps: - name: dependent-step - if: ${{ failure() }} + if: ${{ needs.failed-job.result == 'failed' }} run: | echo "This job should fail" exit 1 From 1924e2d5adb54078e95c905e3460ae98d47a9c80 Mon Sep 17 00:00:00 2001 From: Przemek Pokrywka <12400578+dekiel@users.noreply.github.com> Date: Wed, 16 Oct 2024 16:17:15 +0200 Subject: [PATCH 5/7] Update test-failed-job.yml --- .github/workflows/test-failed-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-failed-job.yml b/.github/workflows/test-failed-job.yml index 8a649279c43e..17858c1148d1 100644 --- a/.github/workflows/test-failed-job.yml +++ b/.github/workflows/test-failed-job.yml @@ -46,7 +46,7 @@ jobs: dependent-job-4: runs-on: ubuntu-latest needs: failed-job - if: ${{ (always() }} + if: ${{ always() }} steps: - name: dependent-step if: ${{ needs.failed-job.result == 'failed' }} From 0eee84b34a3aac4199c2c8dca61039b682f462d5 Mon Sep 17 00:00:00 2001 From: dekiel Date: Wed, 16 Oct 2024 18:15:48 +0200 Subject: [PATCH 6/7] Use newest production image syncer. --- .github/workflows/image-syncer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-syncer.yml b/.github/workflows/image-syncer.yml index 64dfb3161b47..7a48fe83af5d 100644 --- a/.github/workflows/image-syncer.yml +++ b/.github/workflows/image-syncer.yml @@ -100,7 +100,7 @@ jobs: --workdir /github/workspace --rm --volume "$GITHUB_WORKSPACE:/github/workspace" - europe-docker.pkg.dev/kyma-project/dev/test-infra/image-syncer:latest + europe-docker.pkg.dev/kyma-project/prod/image-syncer:v20241016-5e3fb3e2 --images-file=/github/workspace/external-images.yaml --access-token=${{ steps.authenticate_in_gcp.outputs.access_token }} --dry-run=${{ steps.set_dry_run_flag.outputs.DRY_RUN }} From f2d88410edc5d79860762836ce9e37f179a67bff Mon Sep 17 00:00:00 2001 From: dekiel Date: Wed, 16 Oct 2024 18:27:49 +0200 Subject: [PATCH 7/7] Empty-Commit