blob: 4b04c9bab9f843a0dff05cf84744ee0f94e03a25 [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
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:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050052 name: JUNO_ROOTFS_URL
53 default: 'http://releases.linaro.org/openembedded/aarch64/17.01/linaro-image-minimal-genericarmv8-20170127-888.rootfs.tar.gz'
54 - string:
55 name: MBEDTLS_URL
Ryan Everette6e551c2024-09-16 15:30:54 +010056 default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.6.1.tar.gz'
Milosz Wasilewski10438582020-12-03 11:36:21 +000057 - string:
58 name: GERRIT_PATCHSET_NUMBER
59 default: ''
60 - string:
61 name: GERRIT_CHANGE_NUMBER
62 default: ''
63 - string:
Milosz Wasilewski204a27e2020-12-10 10:29:45 +000064 name: GERRIT_HOST
65 default: 'review.trustedfirmware.org'
66 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000067 name: QA_SERVER_TEAM
68 default: 'tf'
69 - string:
70 name: QA_SERVER_PROJECT
71 default: 'tf-a'
72 - string:
Leonardo Sandoval3791fe42021-05-12 11:52:54 -050073 name: QA_SERVER_VERSION
74 default: ${BUILD_NUMBER}
75 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000076 name: QA_SERVER
77 default: 'https://qa-reports.linaro.org'
Leonardo Sandoval425ed9f2021-09-06 17:48:10 -050078 - string:
79 name: QA_TOOLS_REPO
Paul Sokolovsky8fb2fb82023-03-24 15:59:29 +070080 default: 'https://git.gitlab.arm.com/tooling/qa-tools.git'
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050081 - string:
Paul Sokolovskyfc8db3e2023-02-10 23:39:30 +070082 name: QA_TOOLS_BRANCH
Paul Sokolovsky8fb2fb82023-03-24 15:59:29 +070083 default: 'master'
Paul Sokolovskyfc8db3e2023-02-10 23:39:30 +070084 - string:
Paul Sokolovsky2ca12da2023-10-04 21:32:02 +030085 name: LAVA_RETRIES
Paul Sokolovsky0f5a7ce2023-10-05 10:40:53 +030086 default: 2
Paul Sokolovsky2ca12da2023-10-04 21:32:02 +030087 description: |
88 Number of tries submitting job to LAVA in case it fails (stopgap measure against nondeterministic failures)
89 - string:
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +030090 name: USE_TUXSUITE_FVP
Paul Sokolovsky53d99672024-01-25 11:45:36 +070091 default: 1
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +030092 description: |
Paul Sokolovskydb602df2024-01-17 13:01:50 +070093 Whether to submit FVP tests via TuxSuite (instead of LAVA)
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +030094 - string:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050095 name: SHARE_FOLDER
96 default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}'
97 description: 'Folder containing shared repositories for downstream pipeline jobs'
Fathi Boudra9e402bf2019-12-05 11:16:41 +020098 wrappers:
99 - timestamps
Fathi Boudrab4e04c02021-02-11 16:32:12 +0100100 - timeout:
101 timeout: 120
102 fail: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000103 - credentials-binding:
104 - text:
105 credential-id: QA_REPORTS_TOKEN
106 variable: QA_REPORTS_TOKEN
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600107 - credentials-binding:
108 - text:
109 credential-id: LAVA_USER_TF
110 variable: LAVA_USER
111 - credentials-binding:
112 - text:
113 credential-id: LAVA_TOKEN_TF
114 variable: LAVA_TOKEN
Paul Sokolovsky5fd180d2023-11-27 18:38:00 +0300115 - credentials-binding:
116 - text:
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +0300117 credential-id: TUXSUITE_TOKEN
118 variable: TUXSUITE_TOKEN
119 - credentials-binding:
120 - text:
Paul Sokolovsky5fd180d2023-11-27 18:38:00 +0300121 credential-id: ARMCLANG_UBL_CODE
122 variable: ARMCLANG_UBL_CODE
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200123 builders:
Paul Sokolovsky69f20912023-05-09 19:07:02 +0300124 - shell: |
125 aarch64-none-elf-gcc -v || true
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200126 - shell:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -0500127 !include-raw: scripts/clone.sh
128 - shell:
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200129 !include-raw: tf-a-builder/builders.sh
Chris Kayf6ff4672022-11-03 13:09:44 +0000130 - inject:
131 properties-file: artefacts/env
132 - shell: |
133 ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
Paul Sokolovskyb0ef2fc2023-06-13 19:41:48 +0300134 echo ${BIN_MODE:-release} >lava-binmode.txt
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500135 - conditional-step:
136 condition-kind: file-exists
137 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000138 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500139 condition-basedir: workspace
140 steps:
141 - shell: |
142 #!/bin/bash
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500143 set -e
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500144 DEVICE_TYPE=fvp
Chris Kayf6ff4672022-11-03 13:09:44 +0000145 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
146 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
Fathi Boudraf5537c32021-01-21 09:28:05 +0100147 cat << EOF > ${WORKSPACE}/lava.param
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500148 DEVICE_TYPE=${DEVICE_TYPE}
Milosz Wasilewski10438582020-12-03 11:36:21 +0000149 LAVA_SERVER=tf.validation.linaro.org
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500150 EOF
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200151 publishers:
152 - archive:
Paul Sokolovskyb0ef2fc2023-06-13 19:41:48 +0300153 artifacts: artefacts/**, lava-binmode.txt
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200154 latest-only: false
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500155 allow-empty: true
156 - conditional-publisher:
157 - condition-kind: file-exists
158 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000159 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500160 condition-basedir: workspace
161 action:
Milosz Wasilewski10438582020-12-03 11:36:21 +0000162 - postbuildscript:
Paul Sokolovsky096aee52023-05-09 22:10:48 +0300163 mark-unstable-if-failed: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000164 builders:
165 - role: SLAVE
166 build-on:
167 - SUCCESS
168 build-steps:
169 - inject:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100170 properties-file: ${WORKSPACE}/lava.param
Leonardo Sandovale9450132021-04-19 13:51:11 -0500171 - shell: |
Paul Sokolovskyeab838b2023-12-30 00:15:48 +0300172 #!/bin/bash -x
Leonardo Sandovale9450132021-04-19 13:51:11 -0500173
Paul Sokolovskyd11c3202023-12-30 00:27:31 +0300174 tf-a-job-configs/tf-a-builder/submit-test-job.sh
Paul Sokolovskyeab838b2023-12-30 00:15:48 +0300175 status=$?
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700176 tf-a-job-configs/tf-a-builder/lava-log-process.sh
Paul Sokolovskyeab838b2023-12-30 00:15:48 +0300177 if [ $status -ne 0 ]; then
Paul Sokolovsky3f40cc72022-12-08 21:54:43 +0300178 echo "LAVA JOB RESULT: 1"
Paul Sokolovsky096aee52023-05-09 22:10:48 +0300179 exit 1
Leonardo Sandovale9450132021-04-19 13:51:11 -0500180 else
181 echo "LAVA JOB RESULT: 0"
182 fi
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300183 - postbuildscript:
184 builders:
185 - role: SLAVE
186 build-on:
187 - SUCCESS
188 build-steps:
189 - shell: |
Paul Sokolovskyc8e985d2021-12-14 16:46:28 +0300190 #!/bin/bash -e
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300191 echo "=== Starting expect-post tests ==="
192 ./tf-a-ci-scripts/script/expect-post-runner.sh
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600193 - conditional-publisher:
194 - condition-kind: file-exists
195 on-evaluation-failure: dont-run
Arthur She2586b5c2021-05-11 21:00:20 -0700196 condition-filename: lava-raw-debug.log
197 condition-basedir: workspace
198 action:
199 - archive:
200 artifacts: lava-raw-debug.log
201 latest-only: false
202 allow-empty: true
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700203 - archive:
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +0300204 artifacts: lava.log, lava-*.log, tux.id, feedback.log, config_file.json, covtrace-*.log, trace_report/**
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700205 latest-only: false
206 allow-empty: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000207 - groovy-postbuild:
208 script:
209 !include-raw:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100210 - tf-a-builder/postbuild.groovy