I have a couple of repositories which are being analyzed by Sonarcloud, I would like to only analyze the short and long lived branch, not the Pull Request, or find a way to ignore the failed quality gate of the Pull Request Analysis in bitbucket so I merge the PR.
Thanks in advance!
ALM used: Bitbucket Cloud
CI system used: Azure Pipelines
Scanner command used when applicable (private details masked)
Welcome to the community!
Can you share your pipeline?
Hi, thanks for replying, this is my pipeline
This starts with the steps. Do you not define
pull requests: in there?
No, I dont have any defitions for branches or PRs, just this:
After that, I call other steps, like this:
Could we have the text version - redacted as necessary - of the whole thing?
Sure, this is the main file:
- stage: Configure_Test_and_Build
- job: Sonarcloud
displayName: Testing and Sonarcloud Analysis
- template: pipeline-templates/test.yml
this is the test.yml
- bash: echo "##vso[task.setvariable variable=node_version]$(cat .nvmrc)"
displayName: Get node version
- task: NodeTool@0
- task: Cache@2
key: 'yarn | "$(Agent.OS)" | yarn.lock'
yarn | "$(Agent.OS)"
displayName: Cache Yarn packages
- script: yarn --frozen-lockfile
- script: |
displayName: Install local dependecies
- script: |
yarn run test:cov
displayName: Run tests with coverage report
- task: SonarCloudPrepare@1
displayName: Preparing repository data for Sonar analysis
- task: SonarCloudAnalyze@1
displayName: Executing Sonar analysis
- task: SonarCloudPublish@1
displayName: Uploading analysis results to Sonarcloud
Thanks for this.
I’m new to Azure pipelines. From what I’m seeing online, it’s more typical to have this syntax:
I’m wondering if the difference in syntax is causing a misfire on the
Actually when a PR to develop is created it runs a desired build, however I dont want to it to be analyzed by Sonarcloud, just when I pushed changes to a branch. Is this possible?
Does this relate to this thread?
Hi, a couple of days ago I’ve noticed that Sonarcloud stopped posting updates on code analysis for my PRs.
There was a Pull request that took more than 10 days and I could see that commits from 7 days ago had the report updated, but fresh ones from 1-2 days ago don’t.
I had a suspicion that the token expired.
But when I go to the list of checks for the PR it has the report there, which means that that’s not the issue.
I’m not sure where I should be looking anymore
thanks Ann, I’ll try to find that approach on Azure Pipelines. If someone knows how to do it, I’ll appreciate the support!