-
Notifications
You must be signed in to change notification settings - Fork 126
/
.cirrus.ibuilds.yml
100 lines (94 loc) · 3.9 KB
/
.cirrus.ibuilds.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
env:
CIRRUS_CLONE_DEPTH: "1"
CIRRUS_SHELL: bash
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]
ARTIFACTORY_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-private-reader access_token]
SLACK_TOKEN: VAULT[development/kv/data/slack data.token]
SLACK_CHANNEL: squad-ide-eclipse-bots
CIRRUS_PIPELINE_NAME: "SLE iBuilds"
# We will only run this pipeline on dedicated branches
only_dedicated_branches: &ONLY_IF
skip: "changesIncludeOnly('.github/*', 'docs/*', 'org.sonarlint.eclipse.core.tests/*', 'scripts/*', '**/README.md')"
only_if: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_TAG == ""
container_definition: &CONTAINER_DEFINITION
image: ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j17-m3.9-latest
region: eu-central-1
cluster_name: ${CIRRUS_CLUSTER_NAME}
namespace: default
eks_builder_container: &BUILDER_CONTAINER_DEFINITION
<<: *CONTAINER_DEFINITION
dockerfile: .cirrus/Dockerfile
docker_arguments:
CIRRUS_AWS_ACCOUNT: ${CIRRUS_AWS_ACCOUNT}
builder_role: cirrus-builder
builder_image: docker-builder-v*
builder_instance_type: m6a.large
# Maven cache based on pom.xml files and the Eclipse (Tycho) target platforms
maven_cache_qa: &SETUP_MAVEN_CACHE
maven_cache:
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
fingerprint_script:
- /usr/bin/find . -name pom.xml -not -path './its/*' -exec cat {} \+
- cat target-platforms/*.target
# Run iBuilds compatibility tests (with packaged update site for that)
qa_ibuilds_task:
<<: *ONLY_IF
allow_failures: true
skip_notifications: true
eks_container:
<<: *BUILDER_CONTAINER_DEFINITION
cpu: 6
memory: 12G
type: m6a.large
env:
ARTIFACTORY_API_KEY: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-private-reader access_token]
GITHUB_TOKEN: VAULT[development/github/token/licenses-ro token]
DISPLAY: :10
MAVEN_OPTS: -Xmx3072m
<<: *SETUP_MAVEN_CACHE
prepare_update_site_script: |
set -euo pipefail
source cirrus-env QA
source .cirrus/set_maven_build_version "$BUILD_NUMBER"
mvn -B -e -V package
prepare_background_script: |
set -euo pipefail
/etc/init.d/xvfb start
metacity --sm-disable --replace &
sleep 10 # give metacity some time to start
echo 'Recording tests on video'
ffmpeg -loglevel warning -f x11grab -video_size 1920x1080 -i ${DISPLAY} -codec:v libx264 -r 12 ${CIRRUS_WORKING_DIR}/recording.mp4
run_its_script: |
echo "Run Maven ITs for Standalone Mode on Eclipse iBuilds"
cd its/
mvn -B -e -V verify \
-P \!connectedModeSq,\!connectedModeSc \
-Dtarget.platform=ibuilds \
-Dtycho.localArtifacts=ignore \
-Dsonarlint-eclipse.p2.url="file://${CIRRUS_WORKING_DIR}/org.sonarlint.eclipse.site/target/repository"
cleanup_before_cache_script: cleanup_maven_repository
always:
stop_recording_script: |
pkill -SIGINT -f ffmpeg
while pgrep ffmpeg >/dev/null; do sleep 1; done
/etc/init.d/xvfb stop
test_recording_artifacts:
path: "${CIRRUS_WORKING_DIR}/recording.mp4"
mvn_startTestLog_artifacts:
path: "${CIRRUS_WORKING_DIR}/its/**/target/work/configuration/*.log"
mvn_runTestLog_artifacts:
path: "${CIRRUS_WORKING_DIR}/its/**/target/work/data/.metadata/.log"
on_failure:
xvfb_log_artifacts:
path: "${CIRRUS_WORKING_DIR}/Xvfb.out"
reports_artifacts:
path: "**/reports/**/*"
junit_artifacts:
paths:
- "**/test-results/**/*.xml"
- "**/target/surefire-reports/TEST-*.xml"
format: junit
slack_notification_script: |
source slack-failure-notification "Cirrus CI build failure on pipeline: $CIRRUS_PIPELINE_NAME"