blob: e54f4fac936183fa6a3bef5c178671605b176fe7 [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
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:
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:
52 name: ARMLMD_LICENSE_FILE
Riku Voipioaf06a082021-08-24 13:58:13 +030053 default: '27000@flexnet.trustedfirmware.org'
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -050054 - string:
55 name: JUNO_ROOTFS_URL
56 default: 'http://releases.linaro.org/openembedded/aarch64/17.01/linaro-image-minimal-genericarmv8-20170127-888.rootfs.tar.gz'
57 - string:
58 name: MBEDTLS_URL
Sandrine Bailleux135741b2023-09-11 16:10:04 +020059 default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.4.1.tar.gz'
Milosz Wasilewski10438582020-12-03 11:36:21 +000060 - string:
61 name: GERRIT_PATCHSET_NUMBER
62 default: ''
63 - string:
64 name: GERRIT_CHANGE_NUMBER
65 default: ''
66 - string:
Milosz Wasilewski204a27e2020-12-10 10:29:45 +000067 name: GERRIT_HOST
68 default: 'review.trustedfirmware.org'
69 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000070 name: QA_SERVER_TEAM
71 default: 'tf'
72 - string:
73 name: QA_SERVER_PROJECT
74 default: 'tf-a'
75 - string:
Leonardo Sandoval3791fe42021-05-12 11:52:54 -050076 name: QA_SERVER_VERSION
77 default: ${BUILD_NUMBER}
78 - string:
Milosz Wasilewski10438582020-12-03 11:36:21 +000079 name: QA_SERVER
80 default: 'https://qa-reports.linaro.org'
Leonardo Sandoval425ed9f2021-09-06 17:48:10 -050081 - string:
82 name: QA_TOOLS_REPO
Paul Sokolovsky8fb2fb82023-03-24 15:59:29 +070083 default: 'https://git.gitlab.arm.com/tooling/qa-tools.git'
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050084 - string:
Paul Sokolovskyfc8db3e2023-02-10 23:39:30 +070085 name: QA_TOOLS_BRANCH
Paul Sokolovsky8fb2fb82023-03-24 15:59:29 +070086 default: 'master'
Paul Sokolovskyfc8db3e2023-02-10 23:39:30 +070087 - string:
Paul Sokolovsky2ca12da2023-10-04 21:32:02 +030088 name: LAVA_RETRIES
Paul Sokolovsky0f5a7ce2023-10-05 10:40:53 +030089 default: 2
Paul Sokolovsky2ca12da2023-10-04 21:32:02 +030090 description: |
91 Number of tries submitting job to LAVA in case it fails (stopgap measure against nondeterministic failures)
92 - string:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -050093 name: SHARE_FOLDER
94 default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}'
95 description: 'Folder containing shared repositories for downstream pipeline jobs'
Fathi Boudra9e402bf2019-12-05 11:16:41 +020096 wrappers:
97 - timestamps
Fathi Boudrab4e04c02021-02-11 16:32:12 +010098 - timeout:
99 timeout: 120
100 fail: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000101 - credentials-binding:
102 - text:
103 credential-id: QA_REPORTS_TOKEN
104 variable: QA_REPORTS_TOKEN
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600105 - credentials-binding:
106 - text:
107 credential-id: LAVA_USER_TF
108 variable: LAVA_USER
109 - credentials-binding:
110 - text:
111 credential-id: LAVA_TOKEN_TF
112 variable: LAVA_TOKEN
Paul Sokolovsky5fd180d2023-11-27 18:38:00 +0300113 - credentials-binding:
114 - text:
115 credential-id: ARMCLANG_UBL_CODE
116 variable: ARMCLANG_UBL_CODE
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200117 builders:
Paul Sokolovsky69f20912023-05-09 19:07:02 +0300118 - shell: |
119 aarch64-none-elf-gcc -v || true
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200120 - shell:
Leonardo Sandovald1b6b5a2021-09-13 12:06:26 -0500121 !include-raw: scripts/clone.sh
122 - shell:
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200123 !include-raw: tf-a-builder/builders.sh
Chris Kayf6ff4672022-11-03 13:09:44 +0000124 - inject:
125 properties-file: artefacts/env
126 - shell: |
127 ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
Paul Sokolovskyb0ef2fc2023-06-13 19:41:48 +0300128 echo ${BIN_MODE:-release} >lava-binmode.txt
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500129 - conditional-step:
130 condition-kind: file-exists
131 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000132 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500133 condition-basedir: workspace
134 steps:
135 - shell: |
136 #!/bin/bash
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500137 set -e
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500138 DEVICE_TYPE=fvp
Chris Kayf6ff4672022-11-03 13:09:44 +0000139 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
140 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
Fathi Boudraf5537c32021-01-21 09:28:05 +0100141 cat << EOF > ${WORKSPACE}/lava.param
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500142 DEVICE_TYPE=${DEVICE_TYPE}
Milosz Wasilewski10438582020-12-03 11:36:21 +0000143 LAVA_SERVER=tf.validation.linaro.org
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500144 EOF
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200145 publishers:
146 - archive:
Paul Sokolovskyb0ef2fc2023-06-13 19:41:48 +0300147 artifacts: artefacts/**, lava-binmode.txt
Fathi Boudra9e402bf2019-12-05 11:16:41 +0200148 latest-only: false
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500149 allow-empty: true
150 - conditional-publisher:
151 - condition-kind: file-exists
152 on-evaluation-failure: dont-run
Chris Kayf6ff4672022-11-03 13:09:44 +0000153 condition-filename: artefacts-lava/job.yaml
Leonardo Sandovaldc2a03a2020-10-05 18:12:19 -0500154 condition-basedir: workspace
155 action:
Milosz Wasilewski10438582020-12-03 11:36:21 +0000156 - postbuildscript:
Paul Sokolovsky096aee52023-05-09 22:10:48 +0300157 mark-unstable-if-failed: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000158 builders:
159 - role: SLAVE
160 build-on:
161 - SUCCESS
162 build-steps:
163 - inject:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100164 properties-file: ${WORKSPACE}/lava.param
Leonardo Sandovale9450132021-04-19 13:51:11 -0500165 - shell: |
Paul Sokolovskyeab838b2023-12-30 00:15:48 +0300166 #!/bin/bash -x
Leonardo Sandovale9450132021-04-19 13:51:11 -0500167
Paul Sokolovskyeab838b2023-12-30 00:15:48 +0300168 tf-a-job-configs/pfalcon-tf-a-builder/submit-test-job.sh
169 status=$?
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700170 tf-a-job-configs/tf-a-builder/lava-log-process.sh
Paul Sokolovskyeab838b2023-12-30 00:15:48 +0300171 if [ $status -ne 0 ]; then
Paul Sokolovsky3f40cc72022-12-08 21:54:43 +0300172 echo "LAVA JOB RESULT: 1"
Paul Sokolovsky096aee52023-05-09 22:10:48 +0300173 exit 1
Leonardo Sandovale9450132021-04-19 13:51:11 -0500174 else
175 echo "LAVA JOB RESULT: 0"
176 fi
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300177 - postbuildscript:
178 builders:
179 - role: SLAVE
180 build-on:
181 - SUCCESS
182 build-steps:
183 - shell: |
Paul Sokolovskyc8e985d2021-12-14 16:46:28 +0300184 #!/bin/bash -e
Paul Sokolovskyc4df9f72021-11-16 16:35:57 +0300185 echo "=== Starting expect-post tests ==="
186 ./tf-a-ci-scripts/script/expect-post-runner.sh
Leonardo Sandoval9f159802021-01-20 16:47:25 -0600187 - conditional-publisher:
188 - condition-kind: file-exists
189 on-evaluation-failure: dont-run
Arthur She2586b5c2021-05-11 21:00:20 -0700190 condition-filename: lava-raw-debug.log
191 condition-basedir: workspace
192 action:
193 - archive:
194 artifacts: lava-raw-debug.log
195 latest-only: false
196 allow-empty: true
Paul Sokolovsky05cafdf2023-03-16 16:49:30 +0700197 - archive:
198 artifacts: lava.log, lava-*.log, feedback.log, config_file.json, covtrace-*.log, trace_report/**
199 latest-only: false
200 allow-empty: true
Milosz Wasilewski10438582020-12-03 11:36:21 +0000201 - groovy-postbuild:
202 script:
203 !include-raw:
Fathi Boudraf5537c32021-01-21 09:28:05 +0100204 - tf-a-builder/postbuild.groovy