blob: ca87391b94232e09010f69d747e945808738ee06 [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
80 default: 'https://git.gitlab.arm.com/tooling/qa-tools.git'
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050081 - string:
82 name: SHARE_FOLDER
83 default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}'
84 description: 'Folder containing shared repositories for downstream pipeline jobs'
Fathi Boudra9e402bf2019-12-05 11:16:41 +020085 wrappers:
86 - timestamps
Fathi Boudrab4e04c02021-02-11 16:32:12 +010087 - timeout:
88 timeout: 120
89 fail: true
Milosz Wasilewski10438582020-12-03 11:36:21 +000090 - credentials-binding:
91 - text:
92 credential-id: QA_REPORTS_TOKEN
93 variable: QA_REPORTS_TOKEN
Leonardo Sandoval9f159802021-01-20 16:47:25 -060094 - credentials-binding:
95 - text:
96 credential-id: LAVA_USER_TF
97 variable: LAVA_USER
98 - credentials-binding:
99 - text:
100 credential-id: LAVA_TOKEN_TF
101 variable: LAVA_TOKEN
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200102 builders:
103 - shell:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -0500104 !include-raw: scripts/clone.sh
105 - shell:
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200106 !include-raw: tf-a-builder/builders.sh
Chris Kayf6ff4672022-11-03 13:09:44 +0000107 - inject:
108 properties-file: artefacts/env
109 - shell: |
110 ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500111 - conditional-step:
112 condition-kind: file-exists
113 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000114 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500115 condition-basedir: workspace
116 steps:
117 - shell: |
118 #!/bin/bash
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500119 set -e
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500120 DEVICE_TYPE=fvp
Chris Kayf6ff4672022-11-03 13:09:44 +0000121 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
122 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
Fathi Boudraf5537c32021-01-21 09:28:05 +0100123 cat << EOF > ${WORKSPACE}/lava.param
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500124 DEVICE_TYPE=${DEVICE_TYPE}
Milosz Wasilewski10438582020-12-03 11:36:21 +0000125 LAVA_SERVER=tf.validation.linaro.org
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500126 EOF
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200127 publishers:
128 - archive:
Chris Kayf6ff4672022-11-03 13:09:44 +0000129 artifacts: artefacts/**, artefacts-lava/**
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200130 latest-only: false
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500131 allow-empty: true
132 - conditional-publisher:
133 - condition-kind: file-exists
134 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000135 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500136 condition-basedir: workspace
137 action:
Milosz Wasilewski10438582020-12-03 11:36:21 +0000138 - postbuildscript:
139 builders:
140 - role: SLAVE
141 build-on:
142 - SUCCESS
143 build-steps:
144 - inject:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100145 properties-file: ${WORKSPACE}/lava.param
Leonardo Sandovale9450132021-04-19 13:51:11 -0500146 - shell: |
147 #!/bin/bash
148
149 squad='tf-a-job-configs/tf-a-builder/squad.sh'
Leonardo Sandoval60e35df2021-10-04 10:49:14 -0500150 # FIXME: Juno and FVP jobs may fail due to non-related users changes,
151 # so CI needs to resubmit the job, at most three times:
152 # Juno jobs may fail due to LAVA lab infrastructure issues (see
153 # https://projects.linaro.org/browse/LSS-2128)
154 # FVP jobs may hang at some particular TFTF test (see
155 # https://linaro.atlassian.net/browse/TFC-176)
Paul Sokolovsky3f40cc72022-12-08 21:54:43 +0300156 passed=0
Paul Sokolovsky539cddd2023-01-31 14:26:46 +0700157 for i in $(seq 1 2); do
Paul Sokolovsky3f40cc72022-12-08 21:54:43 +0300158 echo "# SQUAD submission iteration #$i"
159 if $squad; then
160 passed=1
161 break
Leonardo Sandovale9450132021-04-19 13:51:11 -0500162 fi
Paul Sokolovsky3f40cc72022-12-08 21:54:43 +0300163 done
164 if [ $passed -eq 0 ]; then
165 echo "LAVA JOB RESULT: 1"
Leonardo Sandovale9450132021-04-19 13:51:11 -0500166 else
167 echo "LAVA JOB RESULT: 0"
Paul Sokolovsky126be882023-02-09 22:50:40 +0700168 tf-a-job-configs/tf-a-builder/lava-log-process.sh
Leonardo Sandovale9450132021-04-19 13:51:11 -0500169 fi
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300170 - postbuildscript:
171 builders:
172 - role: SLAVE
173 build-on:
174 - SUCCESS
175 build-steps:
176 - shell: |
Paul Sokolovskyc8e985d2021-12-14 16:46:28 +0300177 #!/bin/bash -e
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300178 echo "=== Starting expect-post tests ==="
179 ./tf-a-ci-scripts/script/expect-post-runner.sh
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600180 - conditional-publisher:
181 - condition-kind: file-exists
182 on-evaluation-failure: dont-run
Arthur She2586b5c2021-05-11 21:00:20 -0700183 condition-filename: lava-raw-debug.log
184 condition-basedir: workspace
185 action:
186 - archive:
187 artifacts: lava-raw-debug.log
188 latest-only: false
189 allow-empty: true
190 - conditional-publisher:
191 - condition-kind: file-exists
192 on-evaluation-failure: dont-run
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600193 condition-filename: lava.log
194 condition-basedir: workspace
195 action:
196 - archive:
Chris Kaydaa73df2022-11-17 10:27:53 +0000197 artifacts: lava.log, lava-*.log, feedback.log, config_file.json, covtrace-*.log, trace_report/**
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600198 latest-only: false
199 allow-empty: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000200 - groovy-postbuild:
201 script:
202 !include-raw:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100203 - tf-a-builder/postbuild.groovy