Fazzani / az-devops-extensions

Azure devops extensions
MIT License
1 stars 0 forks source link

Sonar Azure devops extension setting -- project variable #11

Open Fazzani opened 3 years ago

Fazzani commented 3 years ago
- script: |
    curl --request POST -u $SONARTOKEN: \
      --data "component=$(Build.Repository.Name)" \
      --data "key=sonar.pullrequest.provider" \
      --data "value=Azure DevOps Services" \
      https://sonarcloud.io/api/settings/set
  displayName: 'Set PR provider for current project in sonarcloud'
  env:
    SONARTOKEN: $(sonar.token)
- script: |
    curl --request POST -u $SONARTOKEN: \
      --data "component=$(Build.Repository.Name)" \
      --data "key=sonar.pullrequest.vsts.token.secured" \
      --data "value=$SYSTEM_ACCESSTOKEN" \
      https://sonarcloud.io/api/settings/set
  displayName: 'Set PR token for current project in sonarcloud'
  env:
    SYSTEM_ACCESSTOKEN: $(System.AccessToken)
    SONARTOKEN: $(sonar.token)
Fazzani commented 3 years ago

Build.Repository.Provider