blob: 823d09c5ce554336050c089174d14e054977222a [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
Paul Sokolovskyd9f65b52024-10-22 13:50:58 +07008 description: |
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -05009 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
Fathi Boudra9e402bf2019-12-05 11:16:41 +020014 parameters:
15 - string:
Leonardo Sandovalafdd5ce2020-07-06 11:35:36 -050016 name: import_cc
Leonardo Sandovalafdd5ce2020-07-06 11:35:36 -050017 - string:
Paul Sokolovsky7be2e052021-11-08 14:45:01 +030018 name: TEST_CONFIG
19 description: |
20 Original test configuration.
21 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050022 name: TEST_DESC
Paul Sokolovsky7be2e052021-11-08 14:45:01 +030023 description: |
24 Expanded and normalized test configuration, aka "test description"
Fathi Boudra18eca5c2020-01-16 17:50:42 +020025 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050026 name: TF_GERRIT_PROJECT
Fathi Boudra18eca5c2020-01-16 17:50:42 +020027 default: 'TF-A/trusted-firmware-a'
28 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050029 name: TF_GERRIT_BRANCH
Fathi Boudra18eca5c2020-01-16 17:50:42 +020030 default: 'refs/heads/master'
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050031 - string:
32 name: TF_GERRIT_REFSPEC
33 default: '+refs/heads/master:refs/remotes/origin/master'
34 - string:
35 name: TFTF_GERRIT_PROJECT
36 default: 'TF-A/tf-a-tests'
37 - string:
38 name: TFTF_GERRIT_BRANCH
39 default: 'refs/heads/master'
40 - string:
41 name: TFTF_GERRIT_REFSPEC
42 default: '+refs/heads/master:refs/remotes/origin/master'
43 - string:
Paul Sokolovsky1d4700c2023-06-12 16:00:16 +030044 name: CI_REFSPEC
45 default: '+refs/heads/master:refs/remotes/origin/master'
46 - string:
Saheer Babub495f032025-01-21 23:01:11 +000047 name: JOBS_REFSPEC
48 default: 'refs/heads/master'
49 description: |
50 tf-a-job-configs refspec to use. The master branch is used by default.
51 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050052 name: DOCKER_REGISTRY
Arthur Shea1223f12025-02-03 14:23:10 -080053 default: ${PRIVATE_CONTAINER_REGISTRY}
54 description: PRIVATE_CONTAINER_REGISTRY is a system-wide environment variable
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050055 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050056 name: JUNO_ROOTFS_URL
57 default: 'http://releases.linaro.org/openembedded/aarch64/17.01/linaro-image-minimal-genericarmv8-20170127-888.rootfs.tar.gz'
58 - string:
59 name: MBEDTLS_URL
Lauren Wehrmeistercec409a2025-04-03 14:34:02 -050060 default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.6.3.tar.gz'
Milosz Wasilewski10438582020-12-03 11:36:21 +000061 - string:
62 name: GERRIT_PATCHSET_NUMBER
63 default: ''
64 - string:
65 name: GERRIT_CHANGE_NUMBER
66 default: ''
67 - string:
Milosz Wasilewski204a27e2020-12-10 10:29:45 +000068 name: GERRIT_HOST
69 default: 'review.trustedfirmware.org'
70 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000071 name: QA_SERVER_TEAM
72 default: 'tf'
73 - string:
74 name: QA_SERVER_PROJECT
75 default: 'tf-a'
76 - string:
Leonardo Sandoval3791fe42021-05-12 11:52:54 -050077 name: QA_SERVER_VERSION
78 default: ${BUILD_NUMBER}
79 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000080 name: QA_SERVER
81 default: 'https://qa-reports.linaro.org'
Leonardo Sandoval425ed9f2021-09-06 17:48:10 -050082 - string:
83 name: QA_TOOLS_REPO
Paul Sokolovsky8fb2fb82023-03-24 15:59:29 +070084 default: 'https://git.gitlab.arm.com/tooling/qa-tools.git'
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050085 - string:
Paul Sokolovskyfc8db3e2023-02-10 23:39:30 +070086 name: QA_TOOLS_BRANCH
Paul Sokolovsky8fb2fb82023-03-24 15:59:29 +070087 default: 'master'
Paul Sokolovskyfc8db3e2023-02-10 23:39:30 +070088 - string:
Paul Sokolovsky2ca12da2023-10-04 21:32:02 +030089 name: LAVA_RETRIES
Paul Sokolovsky0f5a7ce2023-10-05 10:40:53 +030090 default: 2
Paul Sokolovsky2ca12da2023-10-04 21:32:02 +030091 description: |
92 Number of tries submitting job to LAVA in case it fails (stopgap measure against nondeterministic failures)
93 - string:
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +030094 name: USE_TUXSUITE_FVP
Paul Sokolovsky53d99672024-01-25 11:45:36 +070095 default: 1
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +030096 description: |
Paul Sokolovskydb602df2024-01-17 13:01:50 +070097 Whether to submit FVP tests via TuxSuite (instead of LAVA)
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +030098 - string:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050099 name: SHARE_FOLDER
100 default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}'
101 description: 'Folder containing shared repositories for downstream pipeline jobs'
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200102 wrappers:
103 - timestamps
Fathi Boudrab4e04c02021-02-11 16:32:12 +0100104 - timeout:
105 timeout: 120
106 fail: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000107 - credentials-binding:
108 - text:
109 credential-id: QA_REPORTS_TOKEN
110 variable: QA_REPORTS_TOKEN
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600111 - credentials-binding:
112 - text:
113 credential-id: LAVA_USER_TF
114 variable: LAVA_USER
115 - credentials-binding:
116 - text:
117 credential-id: LAVA_TOKEN_TF
118 variable: LAVA_TOKEN
Paul Sokolovsky5fd180d2023-11-27 18:38:00 +0300119 - credentials-binding:
120 - text:
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +0300121 credential-id: TUXSUITE_TOKEN
122 variable: TUXSUITE_TOKEN
123 - credentials-binding:
124 - text:
Paul Sokolovsky5fd180d2023-11-27 18:38:00 +0300125 credential-id: ARMCLANG_UBL_CODE
126 variable: ARMCLANG_UBL_CODE
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200127 builders:
Paul Sokolovsky69f20912023-05-09 19:07:02 +0300128 - shell: |
129 aarch64-none-elf-gcc -v || true
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200130 - shell:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -0500131 !include-raw: scripts/clone.sh
132 - shell:
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200133 !include-raw: tf-a-builder/builders.sh
Chris Kayf6ff4672022-11-03 13:09:44 +0000134 - inject:
135 properties-file: artefacts/env
136 - shell: |
137 ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
Paul Sokolovskyb0ef2fc2023-06-13 19:41:48 +0300138 echo ${BIN_MODE:-release} >lava-binmode.txt
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500139 - conditional-step:
140 condition-kind: file-exists
141 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000142 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500143 condition-basedir: workspace
144 steps:
145 - shell: |
146 #!/bin/bash
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500147 set -e
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500148 DEVICE_TYPE=fvp
Chris Kayf6ff4672022-11-03 13:09:44 +0000149 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
150 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
Fathi Boudraf5537c32021-01-21 09:28:05 +0100151 cat << EOF > ${WORKSPACE}/lava.param
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500152 DEVICE_TYPE=${DEVICE_TYPE}
Milosz Wasilewski10438582020-12-03 11:36:21 +0000153 LAVA_SERVER=tf.validation.linaro.org
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500154 EOF
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200155 publishers:
156 - archive:
Paul Sokolovskyb0ef2fc2023-06-13 19:41:48 +0300157 artifacts: artefacts/**, lava-binmode.txt
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200158 latest-only: false
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500159 allow-empty: true
160 - conditional-publisher:
161 - condition-kind: file-exists
162 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000163 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500164 condition-basedir: workspace
165 action:
Milosz Wasilewski10438582020-12-03 11:36:21 +0000166 - postbuildscript:
Paul Sokolovsky096aee52023-05-09 22:10:48 +0300167 mark-unstable-if-failed: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000168 builders:
169 - role: SLAVE
170 build-on:
171 - SUCCESS
172 build-steps:
173 - inject:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100174 properties-file: ${WORKSPACE}/lava.param
Leonardo Sandovale9450132021-04-19 13:51:11 -0500175 - shell: |
Paul Sokolovskyeab838b2023-12-30 00:15:48 +0300176 #!/bin/bash -x
Leonardo Sandovale9450132021-04-19 13:51:11 -0500177
Paul Sokolovskyd11c3202023-12-30 00:27:31 +0300178 tf-a-job-configs/tf-a-builder/submit-test-job.sh
Paul Sokolovskyeab838b2023-12-30 00:15:48 +0300179 status=$?
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700180 tf-a-job-configs/tf-a-builder/lava-log-process.sh
Paul Sokolovskyeab838b2023-12-30 00:15:48 +0300181 if [ $status -ne 0 ]; then
Paul Sokolovsky3f40cc72022-12-08 21:54:43 +0300182 echo "LAVA JOB RESULT: 1"
Paul Sokolovsky096aee52023-05-09 22:10:48 +0300183 exit 1
Leonardo Sandovale9450132021-04-19 13:51:11 -0500184 else
185 echo "LAVA JOB RESULT: 0"
186 fi
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300187 - postbuildscript:
188 builders:
189 - role: SLAVE
190 build-on:
191 - SUCCESS
192 build-steps:
193 - shell: |
Paul Sokolovskyc8e985d2021-12-14 16:46:28 +0300194 #!/bin/bash -e
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300195 echo "=== Starting expect-post tests ==="
196 ./tf-a-ci-scripts/script/expect-post-runner.sh
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600197 - conditional-publisher:
198 - condition-kind: file-exists
199 on-evaluation-failure: dont-run
Arthur She2586b5c2021-05-11 21:00:20 -0700200 condition-filename: lava-raw-debug.log
201 condition-basedir: workspace
202 action:
203 - archive:
204 artifacts: lava-raw-debug.log
205 latest-only: false
206 allow-empty: true
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700207 - archive:
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +0300208 artifacts: lava.log, lava-*.log, tux.id, feedback.log, config_file.json, covtrace-*.log, trace_report/**
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700209 latest-only: false
210 allow-empty: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000211 - groovy-postbuild:
212 script:
213 !include-raw:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100214 - tf-a-builder/postbuild.groovy