Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
run: echo "This job has been approved!"
build:
name: Build
if: always() && (needs.requires-approval.result == 'success' || needs.requires-approval.result == 'skipped')
needs: requires-approval
runs-on: ubuntu-latest
strategy:
Expand All @@ -60,6 +61,7 @@ jobs:

integration-tests:
name: Integration Tests (Java ${{ matrix.java-version }})
if: always() && (needs.requires-approval.result == 'success' || needs.requires-approval.result == 'skipped')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic Error: Incorrect dependency check for integration-tests job

The integration-tests job depends on build (line 66), not requires-approval. It should check needs.build.result instead of needs.requires-approval.result. With the current condition, this job will run even if the build job fails, as long as approval succeeded/skipped.

Suggested change
if: always() && (needs.requires-approval.result == 'success' || needs.requires-approval.result == 'skipped')
if: always() && (needs.build.result == 'success' || needs.build.result == 'skipped')

Double-check suggestion before committing. Edit this comment for amendments.


Please provide feedback on the review comment by checking the appropriate box:

  • 🌟 Awesome comment, a human might have missed that.
  • ✅ Helpful comment
  • 🤷 Neutral
  • ❌ This comment is not helpful

runs-on: ubuntu-latest
needs: build
strategy:
Expand All @@ -76,6 +78,7 @@ jobs:

sonarqube-scan:
name: SonarQube Scan
if: always() && (needs.requires-approval.result == 'success' || needs.requires-approval.result == 'skipped')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic Error: Incorrect dependency check for sonarqube-scan job

The sonarqube-scan job depends on build (line 83), not requires-approval. It should check needs.build.result instead of needs.requires-approval.result. With the current condition, this job will run even if the build job fails, as long as approval succeeded/skipped.

Suggested change
if: always() && (needs.requires-approval.result == 'success' || needs.requires-approval.result == 'skipped')
if: always() && (needs.build.result == 'success' || needs.build.result == 'skipped')

Double-check suggestion before committing. Edit this comment for amendments.


Please provide feedback on the review comment by checking the appropriate box:

  • 🌟 Awesome comment, a human might have missed that.
  • ✅ Helpful comment
  • 🤷 Neutral
  • ❌ This comment is not helpful

runs-on: ubuntu-latest
needs: build
steps:
Expand All @@ -91,6 +94,7 @@ jobs:

scan:
name: Blackduck Scan
if: always() && (needs.requires-approval.result == 'success' || needs.requires-approval.result == 'skipped')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic Error: Incorrect dependency check for scan job

The scan job depends on build (line 99), not requires-approval. It should check needs.build.result instead of needs.requires-approval.result. With the current condition, this job will run even if the build job fails, as long as approval succeeded/skipped.

Suggested change
if: always() && (needs.requires-approval.result == 'success' || needs.requires-approval.result == 'skipped')
if: always() && (needs.build.result == 'success' || needs.build.result == 'skipped')

Double-check suggestion before committing. Edit this comment for amendments.


Please provide feedback on the review comment by checking the appropriate box:

  • 🌟 Awesome comment, a human might have missed that.
  • ✅ Helpful comment
  • 🤷 Neutral
  • ❌ This comment is not helpful

runs-on: ubuntu-latest
needs: build
timeout-minutes: 15
Expand All @@ -107,6 +111,7 @@ jobs:

deploy-snapshot:
name: Deploy snapshot to Artifactory
if: always() && (needs.requires-approval.result == 'success' || needs.requires-approval.result == 'skipped')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic Error: Incorrect dependency check for deploy-snapshot job

The deploy-snapshot job depends on build (line 116), not requires-approval. It should check needs.build.result instead of needs.requires-approval.result. With the current condition, this job will run even if the build job fails, as long as approval succeeded/skipped.

Suggested change
if: always() && (needs.requires-approval.result == 'success' || needs.requires-approval.result == 'skipped')
if: always() && (needs.build.result == 'success' || needs.build.result == 'skipped')

Double-check suggestion before committing. Edit this comment for amendments.


Please provide feedback on the review comment by checking the appropriate box:

  • 🌟 Awesome comment, a human might have missed that.
  • ✅ Helpful comment
  • 🤷 Neutral
  • ❌ This comment is not helpful

runs-on: ubuntu-latest
needs: build
steps:
Expand Down Expand Up @@ -155,4 +160,4 @@ jobs:
env:
DEPLOYMENT_USER: ${{ env.DEPLOYMENT_USER }}
DEPLOYMENT_PASS: ${{ env.DEPLOYMENT_PASS }}
shell: bash
shell: bash