|
| 1 | +# content of service-account-credentials.json, used to access to Google Cloud Platform |
| 2 | +gcp_credentials: ENCRYPTED[!1fcffe5cc2de4fbbda5befae835ca275a47c1148dabbbb7b5d21334604efba3ef8730d8bc5820952e575c7dd5177e433!] |
| 3 | + |
| 4 | +# |
| 5 | +# ENV VARIABLES |
| 6 | +# |
| 7 | +env: |
| 8 | + ### Shared variables |
| 9 | + ARTIFACTORY_URL: ENCRYPTED[!2f8fa307d3289faa0aa6791f18b961627ae44f1ef46b136e1a1e63b0b4c86454dbb25520d49b339e2d50a1e1e5f95c88!] |
| 10 | + ARTIFACTORY_PRIVATE_USERNAME: private-reader |
| 11 | + ARTIFACTORY_PRIVATE_PASSWORD: ENCRYPTED[!921e2792ce1fc164aaea1146ab2478e7aefd8aaa87022ca745adccee4deaa470bb883ad3066738fceb37622f239296a7!] |
| 12 | + ARTIFACTORY_API_KEY: ENCRYPTED[!f9526e763214dcd6f0cac5fbf712664bcf05395cc5c8f9f122ccf3a4c6d42c2bc809bff8a6d9904c935a47a05676682c!] |
| 13 | + ARTIFACTORY_DEPLOY_USERNAME: public-qa-deployer |
| 14 | + ARTIFACTORY_DEPLOY_PASSWORD: ENCRYPTED[!ee8f6410a42b81c6c91c7b760e7be7796a7774b6e6e6acf3ff2ecf8c7c04c732865a0300673ea41155c0d19a989c0a5a!] |
| 15 | + ARTIFACTORY_DEPLOY_REPO: sonarsource-public-qa |
| 16 | + |
| 17 | + GCF_ACCESS_TOKEN: ENCRYPTED[!1fb91961a5c01e06e38834e55755231d649dc62eca354593105af9f9d643d701ae4539ab6a8021278b8d9348ae2ce8be!] |
| 18 | + PROMOTE_URL: ENCRYPTED[!e22ed2e34a8f7a1aea5cff653585429bbd3d5151e7201022140218f9c5d620069ec2388f14f83971e3fd726215bc0f5e!] |
| 19 | + |
| 20 | + GITHUB_TOKEN: ENCRYPTED[!f272985ea5b49b3cf9c414b98de6a8e9096be47bfcee52f33311ba3131a2af637c1b956f49585b7757dd84b7c030233a!] |
| 21 | + |
| 22 | + BURGR_URL: ENCRYPTED[!c7e294da94762d7bac144abef6310c5db300c95979daed4454ca977776bfd5edeb557e1237e3aa8ed722336243af2d78!] |
| 23 | + BURGR_USERNAME: ENCRYPTED[!b29ddc7610116de511e74bec9a93ad9b8a20ac217a0852e94a96d0066e6e822b95e7bc1fe152afb707f16b70605fddd3!] |
| 24 | + BURGR_PASSWORD: ENCRYPTED[!83e130718e92b8c9de7c5226355f730e55fb46e45869149a9223e724bb99656878ef9684c5f8cfef434aa716e87f4cf2!] |
| 25 | + |
| 26 | + ### Project variables |
| 27 | + DEPLOY_PULL_REQUEST: true |
| 28 | + ARTIFACTS: "\ |
| 29 | + org.sonarsource.scanner.api:sonar-scanner-api:jar,\ |
| 30 | + org.sonarsource.scanner.api:sonar-scanner-api-batch:jar,\ |
| 31 | + org.sonarsource.scanner.api:sonar-scanner-api-batch-interface:jar,\ |
| 32 | + org.sonarsource.scanner.api:sonar-scanner-api-parent:jar" |
| 33 | + |
| 34 | +# |
| 35 | +# RE-USABLE CONFIGS |
| 36 | +# |
| 37 | +container_definition: &CONTAINER_DEFINITION |
| 38 | + image: gcr.io/ci-cd-215716/base:latest |
| 39 | + cluster_name: cirrus-uscentral1a-cluster |
| 40 | + zone: us-central1-a |
| 41 | + namespace: default |
| 42 | + |
| 43 | +only_sonarsource_qa: &ONLY_SONARSOURCE_QA |
| 44 | + only_if: $CIRRUS_USER_COLLABORATOR == 'true' && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == "master" || $CIRRUS_BRANCH =~ "branch-.*" || $CIRRUS_BRANCH =~ "dogfood-on-.*") |
| 45 | + |
| 46 | +# |
| 47 | +# TASKS |
| 48 | +# |
| 49 | +build_task: |
| 50 | + gke_container: |
| 51 | + <<: *CONTAINER_DEFINITION |
| 52 | + cpu: 2 |
| 53 | + memory: 1G |
| 54 | + env: |
| 55 | + SONAR_TOKEN: ENCRYPTED[!5ba7cbb5bf9d168de69bcd444d9e884c9cf664be1115640cc64e49df6d241c309a87fc527cab533c08f289b167187017!] |
| 56 | + SONAR_HOST_URL: https://next.sonarqube.com/sonarqube |
| 57 | + maven_cache: |
| 58 | + folder: ${CIRRUS_WORKING_DIR}/.m2/repository |
| 59 | + script: |
| 60 | + - source cirrus-env BUILD |
| 61 | + - regular_mvn_build_deploy_analyze |
| 62 | + cleanup_before_cache_script: |
| 63 | + - cleanup_maven_repository |
| 64 | + |
| 65 | +qa_task: |
| 66 | + depends_on: |
| 67 | + - build |
| 68 | + <<: *ONLY_SONARSOURCE_QA |
| 69 | + gke_container: |
| 70 | + <<: *CONTAINER_DEFINITION |
| 71 | + cpu: 2 |
| 72 | + memory: 3G |
| 73 | + env: |
| 74 | + matrix: |
| 75 | + - SQ_VERSION: LATEST_RELEASE[7.9] |
| 76 | + - SQ_VERSION: LATEST_RELEASE |
| 77 | + - SQ_VERSION: DEV |
| 78 | + JAVA_VERSION: |
| 79 | + - LATEST_RELEASE |
| 80 | + maven_cache: |
| 81 | + folder: ${CIRRUS_WORKING_DIR}/.m2/repository |
| 82 | + qa_script: |
| 83 | + - source cirrus-env QA |
| 84 | + - source set_maven_build_version $BUILD_NUMBER |
| 85 | + - cd its |
| 86 | + - mvn -B -e verify -Prun-its -Dsonar.runtimeVersion=$SQ_VERSION -DjavaVersion=$JAVA_VERSION |
| 87 | + cleanup_before_cache_script: |
| 88 | + - cleanup_maven_repository |
| 89 | + on_failure: |
| 90 | + reports_artifacts: |
| 91 | + path: "**/target/**/logs/*" |
| 92 | + |
| 93 | +promote_task: |
| 94 | + depends_on: |
| 95 | + - qa |
| 96 | + <<: *ONLY_SONARSOURCE_QA |
| 97 | + gke_container: |
| 98 | + <<: *CONTAINER_DEFINITION |
| 99 | + cpu: 0.5 |
| 100 | + memory: 500M |
| 101 | + maven_cache: |
| 102 | + folder: $CIRRUS_WORKING_DIR/.m2/repository |
| 103 | + script: |
| 104 | + - cirrus_promote_maven |
| 105 | + cleanup_before_cache_script: |
| 106 | + - cleanup_maven_repository |
0 commit comments