-
Notifications
You must be signed in to change notification settings - Fork 725
SONARJAVA-6258 Add remote workflow to test sonar-java integration on A3S #5574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -400,3 +400,34 @@ | |||||
| - uses: SonarSource/ci-github-actions/promote@v1 | ||||||
| with: | ||||||
| promote-pull-request: true | ||||||
|
|
||||||
| trigger-a3s-integration: | ||||||
| name: Trigger A3S Integration Tests | ||||||
| needs: | ||||||
| - promote | ||||||
| - build | ||||||
| if: ${{ needs.build.outputs.deployed }} #TODO: uncomment: #&& github.ref == 'refs/heads/master' }} | ||||||
|
Check warning on line 409 in .github/workflows/build.yml
|
||||||
| runs-on: sonar-xs-public | ||||||
| permissions: | ||||||
| id-token: write | ||||||
| steps: | ||||||
| - id: secrets | ||||||
| uses: SonarSource/vault-action-wrapper@320bd31b03e5dacaac6be51bbbb15adf7caccc32 # v3.1.0 | ||||||
| with: | ||||||
| secrets: | | ||||||
| development/github/token/{REPO_OWNER_NAME_DASH}-workflow-dispatch token | GITHUB_TOKEN; | ||||||
| - name: Trigger integration tests in sonar-analysis-as-a-service | ||||||
| uses: actions/github-script@v7 | ||||||
| with: | ||||||
| github-token: ${{ fromJSON(steps.secrets.outputs.vault).GITHUB_TOKEN }} | ||||||
| #TODO: ref should be master | ||||||
|
Check warning on line 423 in .github/workflows/build.yml
|
||||||
| script: | | ||||||
| await github.rest.actions.createWorkflowDispatch({ | ||||||
| owner: 'SonarSource', | ||||||
| repo: 'sonar-analysis-as-a-service', | ||||||
| workflow_id: 'update-sonar-java-and-test.yml', | ||||||
| ref: 'lp/add-sonar-java-integration-testing', | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The dispatch targets the feature branch
Suggested change
|
||||||
| inputs: { | ||||||
| sonar_java_build_number: '${{ needs.build.outputs.build-number }}' | ||||||
| } | ||||||
| }); | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
&& github.ref == 'refs/heads/master'guard is commented out, so this job triggers on every promoted build — including PRs. Based on how thedeployedoutput is used throughout this file, it can be true for PR builds, meaning every PR that reaches the promote stage will fire a workflow dispatch intosonar-analysis-as-a-service. That burns downstream tokens and runner quota, and creates noise/flakiness in that repo. If testing cross-repo triggering on PR builds is intentional and temporary, that should be made explicit — otherwise, uncomment the guard now.