blob: 1d4a3f05e1c3f0baac13734ec0cb4d4faea9b774 [file] [log] [blame]
Fathi Boudra9e402bf2019-12-05 11:16:41 +02001- job:
2 name: tf-a-builder
Boyan Karatotev5c87c072023-02-10 11:04:58 +00003 node: docker-amd64-tf-a-jammy
Fathi Boudra9e402bf2019-12-05 11:16:41 +02004 project-type: freestyle
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -05005 concurrent: true
6 disabled: false
Fathi Boudra9e402bf2019-12-05 11:16:41 +02007 defaults: global
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -05008 Description: |
9 Trusted Firmware A (TF-A) builder
Fathi Boudra9e402bf2019-12-05 11:16:41 +020010 properties:
11 - build-discarder:
Benjamin Copeland12a152f2022-03-18 13:16:44 +000012 days-to-keep: 15
Paul Sokolovsky2b0d0112023-01-23 23:08:49 +070013 artifact-num-to-keep: 40000
Riku Voipiobc87be22020-09-04 15:56:09 +030014 - authorization:
Leonardo Sandovalebca8822021-01-25 18:20:04 -060015 !include: authorization.yaml.inc
Fathi Boudra9e402bf2019-12-05 11:16:41 +020016 parameters:
17 - string:
Leonardo Sandovalafdd5ce2020-07-06 11:35:36 -050018 name: import_cc
Leonardo Sandovalafdd5ce2020-07-06 11:35:36 -050019 - string:
Paul Sokolovsky7be2e052021-11-08 14:45:01 +030020 name: TEST_CONFIG
21 description: |
22 Original test configuration.
23 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050024 name: TEST_DESC
Paul Sokolovsky7be2e052021-11-08 14:45:01 +030025 description: |
26 Expanded and normalized test configuration, aka "test description"
Fathi Boudra18eca5c2020-01-16 17:50:42 +020027 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050028 name: TF_GERRIT_PROJECT
Fathi Boudra18eca5c2020-01-16 17:50:42 +020029 default: 'TF-A/trusted-firmware-a'
30 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050031 name: TF_GERRIT_BRANCH
Fathi Boudra18eca5c2020-01-16 17:50:42 +020032 default: 'refs/heads/master'
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050033 - string:
34 name: TF_GERRIT_REFSPEC
35 default: '+refs/heads/master:refs/remotes/origin/master'
36 - string:
37 name: TFTF_GERRIT_PROJECT
38 default: 'TF-A/tf-a-tests'
39 - string:
40 name: TFTF_GERRIT_BRANCH
41 default: 'refs/heads/master'
42 - string:
43 name: TFTF_GERRIT_REFSPEC
44 default: '+refs/heads/master:refs/remotes/origin/master'
45 - string:
Paul Sokolovsky1d4700c2023-06-12 16:00:16 +030046 name: CI_REFSPEC
47 default: '+refs/heads/master:refs/remotes/origin/master'
48 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050049 name: DOCKER_REGISTRY
50 default: '987685672616.dkr.ecr.us-east-1.amazonaws.com'
51 - string:
52 name: ARMLMD_LICENSE_FILE
Riku Voipioaf06a082021-08-24 13:58:13 +030053 default: '27000@flexnet.trustedfirmware.org'
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050054 - string:
55 name: JUNO_ROOTFS_URL
56 default: 'http://releases.linaro.org/openembedded/aarch64/17.01/linaro-image-minimal-genericarmv8-20170127-888.rootfs.tar.gz'
57 - string:
58 name: MBEDTLS_URL
Maksims Svecovs34a6faf2023-05-09 16:03:19 +010059 default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.4.0.tar.gz'
Milosz Wasilewski10438582020-12-03 11:36:21 +000060 - string:
61 name: GERRIT_PATCHSET_NUMBER
62 default: ''
63 - string:
64 name: GERRIT_CHANGE_NUMBER
65 default: ''
66 - string:
Milosz Wasilewski204a27e2020-12-10 10:29:45 +000067 name: GERRIT_HOST
68 default: 'review.trustedfirmware.org'
69 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000070 name: QA_SERVER_TEAM
71 default: 'tf'
72 - string:
73 name: QA_SERVER_PROJECT
74 default: 'tf-a'
75 - string:
Leonardo Sandoval3791fe42021-05-12 11:52:54 -050076 name: QA_SERVER_VERSION
77 default: ${BUILD_NUMBER}
78 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000079 name: QA_SERVER
80 default: 'https://qa-reports.linaro.org'
Leonardo Sandoval425ed9f2021-09-06 17:48:10 -050081 - string:
82 name: QA_TOOLS_REPO
Paul Sokolovsky8fb2fb82023-03-24 15:59:29 +070083 default: 'https://git.gitlab.arm.com/tooling/qa-tools.git'
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050084 - string:
Paul Sokolovskyfc8db3e2023-02-10 23:39:30 +070085 name: QA_TOOLS_BRANCH
Paul Sokolovsky8fb2fb82023-03-24 15:59:29 +070086 default: 'master'
Paul Sokolovskyfc8db3e2023-02-10 23:39:30 +070087 - string:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050088 name: SHARE_FOLDER
89 default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}'
90 description: 'Folder containing shared repositories for downstream pipeline jobs'
Fathi Boudra9e402bf2019-12-05 11:16:41 +020091 wrappers:
92 - timestamps
Fathi Boudrab4e04c02021-02-11 16:32:12 +010093 - timeout:
94 timeout: 120
95 fail: true
Milosz Wasilewski10438582020-12-03 11:36:21 +000096 - credentials-binding:
97 - text:
98 credential-id: QA_REPORTS_TOKEN
99 variable: QA_REPORTS_TOKEN
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600100 - credentials-binding:
101 - text:
102 credential-id: LAVA_USER_TF
103 variable: LAVA_USER
104 - credentials-binding:
105 - text:
106 credential-id: LAVA_TOKEN_TF
107 variable: LAVA_TOKEN
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200108 builders:
Paul Sokolovsky69f20912023-05-09 19:07:02 +0300109 - shell: |
110 aarch64-none-elf-gcc -v || true
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200111 - shell:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -0500112 !include-raw: scripts/clone.sh
113 - shell:
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200114 !include-raw: tf-a-builder/builders.sh
Chris Kayf6ff4672022-11-03 13:09:44 +0000115 - inject:
116 properties-file: artefacts/env
117 - shell: |
118 ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500119 - conditional-step:
120 condition-kind: file-exists
121 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000122 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500123 condition-basedir: workspace
124 steps:
125 - shell: |
126 #!/bin/bash
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500127 set -e
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500128 DEVICE_TYPE=fvp
Chris Kayf6ff4672022-11-03 13:09:44 +0000129 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
130 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
Fathi Boudraf5537c32021-01-21 09:28:05 +0100131 cat << EOF > ${WORKSPACE}/lava.param
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500132 DEVICE_TYPE=${DEVICE_TYPE}
Milosz Wasilewski10438582020-12-03 11:36:21 +0000133 LAVA_SERVER=tf.validation.linaro.org
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500134 EOF
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200135 publishers:
136 - archive:
Chris Kayf6ff4672022-11-03 13:09:44 +0000137 artifacts: artefacts/**, artefacts-lava/**
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200138 latest-only: false
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500139 allow-empty: true
140 - conditional-publisher:
141 - condition-kind: file-exists
142 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000143 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500144 condition-basedir: workspace
145 action:
Milosz Wasilewski10438582020-12-03 11:36:21 +0000146 - postbuildscript:
Paul Sokolovsky096aee52023-05-09 22:10:48 +0300147 mark-unstable-if-failed: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000148 builders:
149 - role: SLAVE
150 build-on:
151 - SUCCESS
152 build-steps:
153 - inject:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100154 properties-file: ${WORKSPACE}/lava.param
Leonardo Sandovale9450132021-04-19 13:51:11 -0500155 - shell: |
156 #!/bin/bash
157
Paul Sokolovsky3b67cb22023-05-11 01:12:23 +0300158 submit_job='tf-a-job-configs/tf-a-builder/submit-test-job.sh'
Leonardo Sandoval60e35df2021-10-04 10:49:14 -0500159 # FIXME: Juno and FVP jobs may fail due to non-related users changes,
160 # so CI needs to resubmit the job, at most three times:
161 # Juno jobs may fail due to LAVA lab infrastructure issues (see
162 # https://projects.linaro.org/browse/LSS-2128)
163 # FVP jobs may hang at some particular TFTF test (see
164 # https://linaro.atlassian.net/browse/TFC-176)
Paul Sokolovsky3f40cc72022-12-08 21:54:43 +0300165 passed=0
Paul Sokolovsky55aacde2023-02-13 08:21:48 +0100166 for i in $(seq 1 3); do
Paul Sokolovsky3b67cb22023-05-11 01:12:23 +0300167 echo "# LAVA submission iteration #$i"
168 if $submit_job; then
Paul Sokolovsky3f40cc72022-12-08 21:54:43 +0300169 passed=1
170 break
Leonardo Sandovale9450132021-04-19 13:51:11 -0500171 fi
Paul Sokolovsky3f40cc72022-12-08 21:54:43 +0300172 done
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700173 tf-a-job-configs/tf-a-builder/lava-log-process.sh
Paul Sokolovsky3f40cc72022-12-08 21:54:43 +0300174 if [ $passed -eq 0 ]; then
175 echo "LAVA JOB RESULT: 1"
Paul Sokolovsky096aee52023-05-09 22:10:48 +0300176 exit 1
Leonardo Sandovale9450132021-04-19 13:51:11 -0500177 else
178 echo "LAVA JOB RESULT: 0"
179 fi
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300180 - postbuildscript:
181 builders:
182 - role: SLAVE
183 build-on:
184 - SUCCESS
185 build-steps:
186 - shell: |
Paul Sokolovskyc8e985d2021-12-14 16:46:28 +0300187 #!/bin/bash -e
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300188 echo "=== Starting expect-post tests ==="
189 ./tf-a-ci-scripts/script/expect-post-runner.sh
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600190 - conditional-publisher:
191 - condition-kind: file-exists
192 on-evaluation-failure: dont-run
Arthur She2586b5c2021-05-11 21:00:20 -0700193 condition-filename: lava-raw-debug.log
194 condition-basedir: workspace
195 action:
196 - archive:
197 artifacts: lava-raw-debug.log
198 latest-only: false
199 allow-empty: true
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700200 - archive:
201 artifacts: lava.log, lava-*.log, feedback.log, config_file.json, covtrace-*.log, trace_report/**
202 latest-only: false
203 allow-empty: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000204 - groovy-postbuild:
205 script:
206 !include-raw:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100207 - tf-a-builder/postbuild.groovy