image: node:16.15.0 definitions: caches: sonar: ~/.sonar/cache steps: - step: &sonarcloud name: Build & Test project against sonarcloud caches: - sonar script: - pipe: sonarsource/sonarcloud-scan:1.2.1 - pipe: sonarsource/sonarcloud-quality-gate:0.1.4 variables: SONAR_TOKEN: ${SONAR_TOKEN} pipelines: default: - step: name: This step runs on all branches script: - echo "This script runs on all branches'." - step: name: Build and test script: - echo "Build app." - step: *sonarcloud