Skip to content

Commit

Permalink
Fix CI by using generic script regular_mvn_build_deploy_analyze aga…
Browse files Browse the repository at this point in the history
…in (#4328)
  • Loading branch information
ilia-kebets-sonarsource authored Oct 30, 2023
1 parent 7384502 commit eabc894
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 58 deletions.
14 changes: 9 additions & 5 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,17 @@ build_task:
#sign artifacts
SIGN_KEY: VAULT[development/kv/data/sign data.key]
PGP_PASSPHRASE: VAULT[development/kv/data/sign data.passphrase]
SONAR_TOKEN: VAULT[development/kv/data/next data.token]
SONAR_HOST_URL: https://next.sonarqube.com/sonarqube
ARTIFACTORY_DEPLOY_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-qa-deployer access_token]
<<: *MAVEN_CACHE
<<: *RUNTIME_CACHE
build_and_deploy_script:
- source cirrus-env BUILD
- jfrog config add repox --url $ARTIFACTORY_URL --access-token $ARTIFACTORY_DEPLOY_ACCESS_TOKEN
- npm config set registry "${ARTIFACTORY_URL}/api/npm/npm"
- npm run build
- ./.cirrus/prepare_deploy_analyze.bash
- ./.cirrus/deploy.bash
- regular_mvn_build_deploy_analyze -Dmaven.test.skip=true -Dmaven.install.skip=true -Dsonar.skip=true
cleanup_before_cache_script: cleanup_maven_repository

analyze_task:
Expand All @@ -128,6 +131,7 @@ analyze_task:
# analysis on next
SONAR_TOKEN: VAULT[development/kv/data/next data.token]
SONAR_HOST_URL: https://next.sonarqube.com/sonarqube
ARTIFACTORY_DEPLOY_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-qa-deployer access_token]
<<: *MAVEN_CACHE
<<: *RUNTIME_CACHE
sonar_cache:
Expand All @@ -136,11 +140,11 @@ analyze_task:
- echo ${CIRRUS_OS}
- curl --silent ${SONAR_HOST_URL}/deploy/plugins/index.txt | sort
build_and_analyze_script:
- source cirrus-env CI
- source cirrus-env QA
- jfrog config add repox --url $ARTIFACTORY_URL --access-token $ARTIFACTORY_DEPLOY_ACCESS_TOKEN
- npm config set registry "${ARTIFACTORY_URL}/api/npm/npm"
- npm run build
- ./.cirrus/prepare_deploy_analyze.bash
- ./.cirrus/analyze.bash
- PULL_REQUEST_SHA=$GIT_SHA1 regular_mvn_build_deploy_analyze -P-deploy-sonarsource,-release,-sign -Dcommercial -Dmaven.shade.skip=true -Dmaven.test.skip=true -Dmaven.install.skip=true -Dmaven.deploy.skip=true -Dsonar.coverage.jacoco.xmlReportPaths=$CIRRUS_WORKING_DIR/report-aggregate/target/site/jacoco-aggregate/jacoco.xml

build_win_task:
depends_on:
Expand Down
15 changes: 0 additions & 15 deletions .cirrus/analyze.bash

This file was deleted.

6 changes: 0 additions & 6 deletions .cirrus/deploy.bash

This file was deleted.

32 changes: 0 additions & 32 deletions .cirrus/prepare_deploy_analyze.bash

This file was deleted.

0 comments on commit eabc894

Please sign in to comment.