image: atlassian/default-image:2 #quickest imag clone: depth: full # SonarCloud scanner needs the full history to assign issues properly definitions: caches: sonar: ~/.sonar/cache # Caching SonarCloud artifacts will speed up your build steps: - step: &build-test-sonarcloud size: 2x name: Sonar scan caches: - sonar script: - pipe: sonarsource/sonarcloud-scan:1.4.0 variables: EXTRA_ARGS: '-Dsonar.organization=[REMOVED] -Dsonar.projectKey=[REMOVED] -Dsonar.sources=. -Dsonar.host.url=https://sonarcloud.io -Dsonar.exclusions=**/build-wrapper-dump.json,public/hexon/**,public/pim/**,public/images/**,public/fonts/**,bitbucket-pipelines.yml,public/mix-manifest.json,**/opt/**/*.js,**/*.map,**/*.svg,**/*.yml,**/*.yaml' DEBUG: "true" - step: &check-quality-gate-sonarcloud name: Check the Quality Gate on SonarCloud script: - pipe: sonarsource/sonarcloud-quality-gate:0.1.6 variables: DEBUG: "true" pipelines: # More info here: https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html branches: master: - step: *build-test-sonarcloud - step: *check-quality-gate-sonarcloud # pull-requests: # '**': # - step: *build-test-sonarcloud # - step: *check-quality-gate-sonarcloud