Feat: use credential for sonarcloud token
[releng/global-jjb.git] / jjb / lf-c-cpp-jobs.yaml
index d1ba86f..92057b7 100644 (file)
     make-opts: ""
     pre-build: ""
     sonar-scanner-version: 3.3.0.1492
-    sonarcloud-api-token: ""
+    sonarcloud-api-token-cred-id: sonarcloud-api-token
     sonarcloud-organization: ""
     sonarcloud-project-key: ""
     stream: master
             SONAR_SCANNER_VERSION={sonar-scanner-version}
             PROJECT_KEY={sonarcloud-project-key}
             PROJECT_ORGANIZATION={sonarcloud-organization}
-            API_TOKEN={sonarcloud-api-token}
       - shell: !include-raw-escape: ../shell/cmake-sonar.sh
       - lf-provide-maven-settings-cleanup
 
+    wrappers:
+      - credentials-binding:
+          - text:
+              credential-id: '{sonarcloud-api-token-cred-id}'
+              variable: API_TOKEN
+
 - job-template:
     name: "{project-name}-cmake-sonar"
     id: gerrit-cmake-sonar