-
Notifications
You must be signed in to change notification settings - Fork 7
/
.cirrus.yml
84 lines (71 loc) · 3 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
env:
CIRRUS_SHELL: bash
### Shared variables
ARTIFACTORY_URL: VAULT[development/kv/data/repox data.url]
ARTIFACTORY_PRIVATE_USERNAME: vault-${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-private-reader
ARTIFACTORY_PRIVATE_PASSWORD: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-private-reader access_token]
GRADLE_USER_HOME: ${CIRRUS_WORKING_DIR}/.gradle
NIGHTLY_CRON: 'nightly-cron'
only_sonarsource_qa: &ONLY_SONARSOURCE_QA
only_if: $CIRRUS_USER_COLLABORATOR == 'true' && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == "master")
except_nightly_cron: &EXCEPT_ON_NIGHTLY_CRON
only_if: $CIRRUS_CRON != $NIGHTLY_CRON
eks_container: &CONTAINER_DEFINITION
image: ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j17-g7-latest
cluster_name: ${CIRRUS_CLUSTER_NAME}
region: eu-central-1
namespace: default
setup_gradle_cache_template: &SETUP_GRADLE_CACHE
gradle_cache:
folder: .gradle/caches
create_gradle_directory_script:
- mkdir -p "${GRADLE_USER_HOME}"
cleanup_gradle_cache_script_template: &CLEANUP_GRADLE_CACHE_SCRIPT
cleanup_gradle_script:
- /usr/bin/find "${GRADLE_USER_HOME}/caches/" -name "*.lock" -type f -delete
- rm -rf "${GRADLE_USER_HOME}/caches/4.10.2/"
- rm -rf "${GRADLE_USER_HOME}/caches/journal-1/"
- rm -rf "${GRADLE_USER_HOME}/caches/build-cache-1/"
build_task:
eks_container:
<<: *CONTAINER_DEFINITION
cpu: 2
memory: 4G
env:
ARTIFACTORY_DEPLOY_REPO: sonarsource-public-qa
ARTIFACTORY_DEPLOY_USERNAME: vault-${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-qa-deployer
ARTIFACTORY_DEPLOY_PASSWORD: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-qa-deployer access_token]
#allow deployment of pull request artifacts to repox
DEPLOY_PULL_REQUEST: true
# analysis on next
SONAR_HOST_URL: VAULT[development/kv/data/next data.url]
SONAR_TOKEN: VAULT[development/kv/data/next data.token]
ORG_GRADLE_PROJECT_signingKey: VAULT[development/kv/data/sign data.key]
ORG_GRADLE_PROJECT_signingPassword: VAULT[development/kv/data/sign data.passphrase]
ORG_GRADLE_PROJECT_signingKeyId: VAULT[development/kv/data/sign data.key_id]
<<: *SETUP_GRADLE_CACHE
build_script:
- source cirrus-env BUILD
- regular_gradle_build_deploy_analyze
on_failure:
reports_artifacts:
path: "**/build/reports/**/*"
junit_artifacts:
path: "**/test-results/**/*.xml"
format: junit
<<: *CLEANUP_GRADLE_CACHE_SCRIPT
promote_task:
depends_on:
- build
<<: *ONLY_SONARSOURCE_QA
<<: *EXCEPT_ON_NIGHTLY_CRON
eks_container:
<<: *CONTAINER_DEFINITION
cpu: 2
memory: 2G
env:
ARTIFACTORY_PROMOTE_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-promoter access_token]
GITHUB_TOKEN: VAULT[development/github/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-promotion token]
#artifacts that will have downloadable links in burgr
ARTIFACTS: org.sonarsource:sonar-plugin-api:jar
script: cirrus_promote_gradle