From f96b918f4c0a76fcf4d46fe1a363b481761e1cff Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Tue, 3 Dec 2024 23:23:58 -0800 Subject: [PATCH] ci(fix): catch canceled jobs (#1344) --- .github/workflows/analysis.yml | 2 +- .github/workflows/pr-open.yml | 2 +- .github/workflows/pr-validate.yml | 2 +- processor/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index cf81b6a8e8..32c97378e9 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -53,6 +53,6 @@ jobs: needs: [tests-java, tests-frontend] # Restore trivy when/if fixed runs-on: ubuntu-24.04 steps: - - if: contains(needs.*.result, 'canceled|failure') + - if: contains(needs.*.result, 'failure')||contains(needs.*.result, 'canceled') run: echo "At least one job has failed." && exit 1 - run: echo "Success!" diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 8f3ffa4761..0302926e58 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -583,6 +583,6 @@ jobs: if: always() runs-on: ubuntu-24.04 steps: - - if: contains(needs.*.result, 'canceled|failure') + - if: contains(needs.*.result, 'failure')||contains(needs.*.result, 'canceled') run: echo "At least one job has failed." && exit 1 - run: echo "Success!" diff --git a/.github/workflows/pr-validate.yml b/.github/workflows/pr-validate.yml index fc2fc5da45..3b1718e241 100644 --- a/.github/workflows/pr-validate.yml +++ b/.github/workflows/pr-validate.yml @@ -76,6 +76,6 @@ jobs: if: always() runs-on: ubuntu-24.04 steps: - - if: contains(needs.*.result, 'canceled|failure') + - if: contains(needs.*.result, 'failure')||contains(needs.*.result, 'canceled') run: echo "At least one job has failed." && exit 1 - run: echo "Success!" diff --git a/processor/Dockerfile b/processor/Dockerfile index f1ce9e7bb8..3b368597a7 100644 --- a/processor/Dockerfile +++ b/processor/Dockerfile @@ -44,4 +44,4 @@ EXPOSE ${PORT} HEALTHCHECK CMD curl -f http://localhost:${PORT}/actuator/health | grep '"status":"UP"' # Startup -ENTRYPOINT ["java", "-jar","/app/nr-forest-client-processor.jar","--spring.profiles.active=container"] \ No newline at end of file +ENTRYPOINT ["java", "-jar", "/app/nr-forest-client-processor.jar", "--spring.profiles.active=container"]