Skip to content

Commit

Permalink
Added condition to jobs because failure of previous tasks are propaga…
Browse files Browse the repository at this point in the history
…ted (#22)
  • Loading branch information
Nikita-Smirnov-Exactpro authored Apr 8, 2024
1 parent 1bcab2c commit c9c0765
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build-dev-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ jobs:
needs:
- build-and-publish-grpc-java
- changes
if: |
always() &&
(needs.changes.outputs.core == 'true' || needs.changes.outputs.grpc == 'true')
if: (needs.changes.outputs.core == 'true' || needs.changes.outputs.grpc == 'true') && !cancelled()
steps:
- uses: actions/checkout@v3
- name: Set up JDK 'zulu' '11'
Expand Down Expand Up @@ -149,8 +147,7 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SONATYPE_GPG_ARMORED_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }}
owasp-scan:
needs:
- build-and-publish-core-java
if: "!cancelled()"
uses: th2-net/.github/.github/workflows/owasp-gradle-scan.yml@main
with:
multiproject: true
Expand All @@ -163,8 +160,8 @@ jobs:
- app-version
- changes
if: |
always() &&
(needs.changes.outputs.app == 'true' || needs.changes.outputs.grpc == 'true' || needs.changes.outputs.core == 'true' || needs.changes.outputs.oracle == 'true')
&& !cancelled()
uses: th2-net/.github/.github/workflows/compaund-java-docker-push.yml@main
with:
docker-username: ${{ github.actor }}
Expand All @@ -177,6 +174,7 @@ jobs:
docker-password: ${{ secrets.GITHUB_TOKEN }}
trivy-docker-scan:
name: Scan Docker image for vulnerabilities
if: needs.publish-docker.result == 'success' && !cancelled()
needs:
- publish-docker
- app-version
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
needs:
- changes
- build-and-publish-grpc-java
if: ${{ needs.changes.outputs.core == 'true' }}
if: (needs.changes.outputs.core == 'true' || needs.changes.outputs.grpc == 'true') && !cancelled()
uses: th2-net/.github/.github/workflows/compaund-java-multi-project-build-release.yml@main
with:
projectPath: core
Expand Down Expand Up @@ -97,8 +97,7 @@ jobs:
sonatypeSigningKey: ${{ secrets.SONATYPE_GPG_ARMORED_KEY }}
sonatypeSigningPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }}
owasp-scan:
needs:
- build-and-publish-core-java
if: "!cancelled()"
uses: th2-net/.github/.github/workflows/owasp-gradle-scan.yml@main
with:
multiproject: true
Expand All @@ -107,8 +106,8 @@ jobs:
publish-docker:
name: Build and publish docker image
if: |
always() &&
(needs.changes.outputs.app == 'true' || needs.changes.outputs.grpc == 'true' || needs.changes.outputs.core == 'true' || needs.changes.outputs.oracle == 'true')
&& !cancelled()
needs:
- build-and-publish-grpc-python
- build-and-publish-grpc-java
Expand All @@ -127,6 +126,7 @@ jobs:
docker-password: ${{ secrets.GITHUB_TOKEN }}
trivy-docker-scan:
name: Scan Docker image for vulnerabilities
if: needs.publish-docker.result == 'success' && !cancelled()
needs:
- publish-docker
- app-version
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-sanpshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
sonatypeSigningKey: ${{ secrets.SONATYPE_GPG_ARMORED_KEY }}
sonatypeSigningPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }}
owasp-scan:
if: "!cancelled()"
uses: th2-net/.github/.github/workflows/owasp-gradle-scan.yml@main
with:
multiproject: true
Expand Down

0 comments on commit c9c0765

Please sign in to comment.