blob: d769e7d179596e812664d2ba11b7e7613c1a96d2 [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:
Saheer Babub495f032025-01-21 23:01:11 +000049 name: JOBS_REFSPEC
50 default: 'refs/heads/master'
51 description: |
52 tf-a-job-configs refspec to use. The master branch is used by default.
53 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050054 name: DOCKER_REGISTRY
Arthur She9296f492025-01-27 21:25:13 -080055 default: ${JENKINS_DOCKER_REGISTRY}
56 description: JENKINS_DOCKER_REGISTRY is a system-wide environment variable
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050057 - string:
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050058 name: JUNO_ROOTFS_URL
59 default: 'http://releases.linaro.org/openembedded/aarch64/17.01/linaro-image-minimal-genericarmv8-20170127-888.rootfs.tar.gz'
60 - string:
61 name: MBEDTLS_URL
Ryan Everettb4f5f8d2024-11-26 11:48:44 +000062 default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.6.2.tar.gz'
Milosz Wasilewski10438582020-12-03 11:36:21 +000063 - string:
64 name: GERRIT_PATCHSET_NUMBER
65 default: ''
66 - string:
67 name: GERRIT_CHANGE_NUMBER
68 default: ''
69 - string:
Milosz Wasilewski204a27e2020-12-10 10:29:45 +000070 name: GERRIT_HOST
71 default: 'review.trustedfirmware.org'
72 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000073 name: QA_SERVER_TEAM
74 default: 'tf'
75 - string:
76 name: QA_SERVER_PROJECT
77 default: 'tf-a'
78 - string:
Leonardo Sandoval3791fe42021-05-12 11:52:54 -050079 name: QA_SERVER_VERSION
80 default: ${BUILD_NUMBER}
81 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000082 name: QA_SERVER
83 default: 'https://qa-reports.linaro.org'
Leonardo Sandoval425ed9f2021-09-06 17:48:10 -050084 - string:
85 name: QA_TOOLS_REPO
Paul Sokolovsky8fb2fb82023-03-24 15:59:29 +070086 default: 'https://git.gitlab.arm.com/tooling/qa-tools.git'
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050087 - string:
Paul Sokolovskyfc8db3e2023-02-10 23:39:30 +070088 name: QA_TOOLS_BRANCH
Paul Sokolovsky8fb2fb82023-03-24 15:59:29 +070089 default: 'master'
Paul Sokolovskyfc8db3e2023-02-10 23:39:30 +070090 - string:
Paul Sokolovsky2ca12da2023-10-04 21:32:02 +030091 name: LAVA_RETRIES
Paul Sokolovsky0f5a7ce2023-10-05 10:40:53 +030092 default: 2
Paul Sokolovsky2ca12da2023-10-04 21:32:02 +030093 description: |
94 Number of tries submitting job to LAVA in case it fails (stopgap measure against nondeterministic failures)
95 - string:
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +030096 name: USE_TUXSUITE_FVP
Paul Sokolovsky53d99672024-01-25 11:45:36 +070097 default: 1
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +030098 description: |
Paul Sokolovskydb602df2024-01-17 13:01:50 +070099 Whether to submit FVP tests via TuxSuite (instead of LAVA)
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +0300100 - string:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -0500101 name: SHARE_FOLDER
102 default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}'
103 description: 'Folder containing shared repositories for downstream pipeline jobs'
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200104 wrappers:
105 - timestamps
Fathi Boudrab4e04c02021-02-11 16:32:12 +0100106 - timeout:
107 timeout: 120
108 fail: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000109 - credentials-binding:
110 - text:
111 credential-id: QA_REPORTS_TOKEN
112 variable: QA_REPORTS_TOKEN
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600113 - credentials-binding:
114 - text:
115 credential-id: LAVA_USER_TF
116 variable: LAVA_USER
117 - credentials-binding:
118 - text:
119 credential-id: LAVA_TOKEN_TF
120 variable: LAVA_TOKEN
Paul Sokolovsky5fd180d2023-11-27 18:38:00 +0300121 - credentials-binding:
122 - text:
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +0300123 credential-id: TUXSUITE_TOKEN
124 variable: TUXSUITE_TOKEN
125 - credentials-binding:
126 - text:
Paul Sokolovsky5fd180d2023-11-27 18:38:00 +0300127 credential-id: ARMCLANG_UBL_CODE
128 variable: ARMCLANG_UBL_CODE
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200129 builders:
Paul Sokolovsky69f20912023-05-09 19:07:02 +0300130 - shell: |
131 aarch64-none-elf-gcc -v || true
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200132 - shell:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -0500133 !include-raw: scripts/clone.sh
134 - shell:
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200135 !include-raw: tf-a-builder/builders.sh
Chris Kayf6ff4672022-11-03 13:09:44 +0000136 - inject:
137 properties-file: artefacts/env
138 - shell: |
139 ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
Paul Sokolovskyb0ef2fc2023-06-13 19:41:48 +0300140 echo ${BIN_MODE:-release} >lava-binmode.txt
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500141 - conditional-step:
142 condition-kind: file-exists
143 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000144 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500145 condition-basedir: workspace
146 steps:
147 - shell: |
148 #!/bin/bash
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500149 set -e
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500150 DEVICE_TYPE=fvp
Chris Kayf6ff4672022-11-03 13:09:44 +0000151 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
152 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
Fathi Boudraf5537c32021-01-21 09:28:05 +0100153 cat << EOF > ${WORKSPACE}/lava.param
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500154 DEVICE_TYPE=${DEVICE_TYPE}
Milosz Wasilewski10438582020-12-03 11:36:21 +0000155 LAVA_SERVER=tf.validation.linaro.org
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500156 EOF
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200157 publishers:
158 - archive:
Paul Sokolovskyb0ef2fc2023-06-13 19:41:48 +0300159 artifacts: artefacts/**, lava-binmode.txt
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200160 latest-only: false
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500161 allow-empty: true
162 - conditional-publisher:
163 - condition-kind: file-exists
164 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000165 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500166 condition-basedir: workspace
167 action:
Milosz Wasilewski10438582020-12-03 11:36:21 +0000168 - postbuildscript:
Paul Sokolovsky096aee52023-05-09 22:10:48 +0300169 mark-unstable-if-failed: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000170 builders:
171 - role: SLAVE
172 build-on:
173 - SUCCESS
174 build-steps:
175 - inject:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100176 properties-file: ${WORKSPACE}/lava.param
Leonardo Sandovale9450132021-04-19 13:51:11 -0500177 - shell: |
Paul Sokolovskyeab838b2023-12-30 00:15:48 +0300178 #!/bin/bash -x
Leonardo Sandovale9450132021-04-19 13:51:11 -0500179
Paul Sokolovskyd11c3202023-12-30 00:27:31 +0300180 tf-a-job-configs/tf-a-builder/submit-test-job.sh
Paul Sokolovskyeab838b2023-12-30 00:15:48 +0300181 status=$?
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700182 tf-a-job-configs/tf-a-builder/lava-log-process.sh
Paul Sokolovskyeab838b2023-12-30 00:15:48 +0300183 if [ $status -ne 0 ]; then
Paul Sokolovsky3f40cc72022-12-08 21:54:43 +0300184 echo "LAVA JOB RESULT: 1"
Paul Sokolovsky096aee52023-05-09 22:10:48 +0300185 exit 1
Leonardo Sandovale9450132021-04-19 13:51:11 -0500186 else
187 echo "LAVA JOB RESULT: 0"
188 fi
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300189 - postbuildscript:
190 builders:
191 - role: SLAVE
192 build-on:
193 - SUCCESS
194 build-steps:
195 - shell: |
Paul Sokolovskyc8e985d2021-12-14 16:46:28 +0300196 #!/bin/bash -e
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300197 echo "=== Starting expect-post tests ==="
198 ./tf-a-ci-scripts/script/expect-post-runner.sh
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600199 - conditional-publisher:
200 - condition-kind: file-exists
201 on-evaluation-failure: dont-run
Arthur She2586b5c2021-05-11 21:00:20 -0700202 condition-filename: lava-raw-debug.log
203 condition-basedir: workspace
204 action:
205 - archive:
206 artifacts: lava-raw-debug.log
207 latest-only: false
208 allow-empty: true
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700209 - archive:
Paul Sokolovsky3b9f81a2023-12-30 00:58:17 +0300210 artifacts: lava.log, lava-*.log, tux.id, feedback.log, config_file.json, covtrace-*.log, trace_report/**
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700211 latest-only: false
212 allow-empty: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000213 - groovy-postbuild:
214 script:
215 !include-raw:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100216 - tf-a-builder/postbuild.groovy