blob: cc699f52bf90de2fe3b4ce2198b38799d48956fd [file] [log] [blame]
Fathi Boudra9e402bf2019-12-05 11:16:41 +02001- job:
2 name: tf-a-builder
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -05003 node: docker-amd64-tf-a-bionic
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:
46 name: DOCKER_REGISTRY
47 default: '987685672616.dkr.ecr.us-east-1.amazonaws.com'
48 - string:
49 name: ARMLMD_LICENSE_FILE
Riku Voipioaf06a082021-08-24 13:58:13 +030050 default: '27000@flexnet.trustedfirmware.org'
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050051 - string:
52 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
Daniel Boulby98d3e4f2022-10-04 14:04:13 +010056 default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-2.28.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 Sokolovsky379e2ca2023-02-11 00:17:27 +070080 default: 'https://git.trustedfirmware.org/ci/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 Sokolovsky379e2ca2023-02-11 00:17:27 +070083 default: 'openci'
Paul Sokolovskyfc8db3e2023-02-10 23:39:30 +070084 - string:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050085 name: SHARE_FOLDER
86 default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}'
87 description: 'Folder containing shared repositories for downstream pipeline jobs'
Fathi Boudra9e402bf2019-12-05 11:16:41 +020088 wrappers:
89 - timestamps
Fathi Boudrab4e04c02021-02-11 16:32:12 +010090 - timeout:
91 timeout: 120
92 fail: true
Milosz Wasilewski10438582020-12-03 11:36:21 +000093 - credentials-binding:
94 - text:
95 credential-id: QA_REPORTS_TOKEN
96 variable: QA_REPORTS_TOKEN
Leonardo Sandoval9f159802021-01-20 16:47:25 -060097 - credentials-binding:
98 - text:
99 credential-id: LAVA_USER_TF
100 variable: LAVA_USER
101 - credentials-binding:
102 - text:
103 credential-id: LAVA_TOKEN_TF
104 variable: LAVA_TOKEN
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200105 builders:
106 - shell:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -0500107 !include-raw: scripts/clone.sh
108 - shell:
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200109 !include-raw: tf-a-builder/builders.sh
Chris Kayf6ff4672022-11-03 13:09:44 +0000110 - inject:
111 properties-file: artefacts/env
112 - shell: |
113 ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500114 - conditional-step:
115 condition-kind: file-exists
116 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000117 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500118 condition-basedir: workspace
119 steps:
120 - shell: |
121 #!/bin/bash
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500122 set -e
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500123 DEVICE_TYPE=fvp
Chris Kayf6ff4672022-11-03 13:09:44 +0000124 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
125 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
Fathi Boudraf5537c32021-01-21 09:28:05 +0100126 cat << EOF > ${WORKSPACE}/lava.param
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500127 DEVICE_TYPE=${DEVICE_TYPE}
Milosz Wasilewski10438582020-12-03 11:36:21 +0000128 LAVA_SERVER=tf.validation.linaro.org
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500129 EOF
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200130 publishers:
131 - archive:
Chris Kayf6ff4672022-11-03 13:09:44 +0000132 artifacts: artefacts/**, artefacts-lava/**
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200133 latest-only: false
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500134 allow-empty: true
135 - conditional-publisher:
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 action:
Milosz Wasilewski10438582020-12-03 11:36:21 +0000141 - postbuildscript:
142 builders:
143 - role: SLAVE
144 build-on:
145 - SUCCESS
146 build-steps:
147 - inject:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100148 properties-file: ${WORKSPACE}/lava.param
Leonardo Sandovale9450132021-04-19 13:51:11 -0500149 - shell: |
150 #!/bin/bash
151
152 squad='tf-a-job-configs/tf-a-builder/squad.sh'
Leonardo Sandoval60e35df2021-10-04 10:49:14 -0500153 # FIXME: Juno and FVP jobs may fail due to non-related users changes,
154 # so CI needs to resubmit the job, at most three times:
155 # Juno jobs may fail due to LAVA lab infrastructure issues (see
156 # https://projects.linaro.org/browse/LSS-2128)
157 # FVP jobs may hang at some particular TFTF test (see
158 # https://linaro.atlassian.net/browse/TFC-176)
Paul Sokolovsky3f40cc72022-12-08 21:54:43 +0300159 passed=0
Paul Sokolovsky55aacde2023-02-13 08:21:48 +0100160 for i in $(seq 1 3); do
Paul Sokolovsky3f40cc72022-12-08 21:54:43 +0300161 echo "# SQUAD submission iteration #$i"
162 if $squad; then
163 passed=1
164 break
Leonardo Sandovale9450132021-04-19 13:51:11 -0500165 fi
Paul Sokolovsky3f40cc72022-12-08 21:54:43 +0300166 done
167 if [ $passed -eq 0 ]; then
168 echo "LAVA JOB RESULT: 1"
Leonardo Sandovale9450132021-04-19 13:51:11 -0500169 else
170 echo "LAVA JOB RESULT: 0"
Paul Sokolovsky126be882023-02-09 22:50:40 +0700171 tf-a-job-configs/tf-a-builder/lava-log-process.sh
Leonardo Sandovale9450132021-04-19 13:51:11 -0500172 fi
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300173 - postbuildscript:
174 builders:
175 - role: SLAVE
176 build-on:
177 - SUCCESS
178 build-steps:
179 - shell: |
Paul Sokolovskyc8e985d2021-12-14 16:46:28 +0300180 #!/bin/bash -e
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300181 echo "=== Starting expect-post tests ==="
182 ./tf-a-ci-scripts/script/expect-post-runner.sh
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600183 - conditional-publisher:
184 - condition-kind: file-exists
185 on-evaluation-failure: dont-run
Arthur She2586b5c2021-05-11 21:00:20 -0700186 condition-filename: lava-raw-debug.log
187 condition-basedir: workspace
188 action:
189 - archive:
190 artifacts: lava-raw-debug.log
191 latest-only: false
192 allow-empty: true
193 - conditional-publisher:
194 - condition-kind: file-exists
195 on-evaluation-failure: dont-run
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600196 condition-filename: lava.log
197 condition-basedir: workspace
198 action:
199 - archive:
Chris Kaydaa73df2022-11-17 10:27:53 +0000200 artifacts: lava.log, lava-*.log, feedback.log, config_file.json, covtrace-*.log, trace_report/**
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600201 latest-only: false
202 allow-empty: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000203 - groovy-postbuild:
204 script:
205 !include-raw:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100206 - tf-a-builder/postbuild.groovy