blob: 4bd61ebb1c4febfbe46ce1cd201060d90fc902e6 [file] [log] [blame]
Saul Romero33f858f2023-02-06 11:15:47 +00001- job:
2 name: saurom-tf-a-builder
Saul Romero97ecc7e2023-03-09 10:48:19 +00003 node: docker-amd64-tf-a-jammy
Saul Romero33f858f2023-02-06 11:15:47 +00004 project-type: freestyle
5 concurrent: true
6 disabled: false
7 defaults: global
8 Description: |
9 Trusted Firmware A (TF-A) builder
10 properties:
11 - build-discarder:
12 days-to-keep: 15
Saul Romeroe0faac72023-03-17 15:27:05 +000013 artifact-num-to-keep: 40000
Saul Romero33f858f2023-02-06 11:15:47 +000014 - authorization:
15 !include: saurom-authorization.yaml.inc
16 parameters:
17 - string:
18 name: import_cc
19 - string:
20 name: TEST_CONFIG
21 description: |
22 Original test configuration.
23 - string:
24 name: TEST_DESC
25 description: |
26 Expanded and normalized test configuration, aka "test description"
27 - string:
28 name: TF_GERRIT_PROJECT
29 default: 'TF-A/trusted-firmware-a'
30 - string:
31 name: TF_GERRIT_BRANCH
32 default: 'refs/heads/master'
33 - 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:
Saul Romero3c233982023-06-28 15:45:33 +010046 name: CI_REFSPEC
47 default: '+refs/heads/master:refs/remotes/origin/master'
48 - string:
Saul Romero33f858f2023-02-06 11:15:47 +000049 name: DOCKER_REGISTRY
50 default: '987685672616.dkr.ecr.us-east-1.amazonaws.com'
51 - string:
52 name: ARMLMD_LICENSE_FILE
53 default: '27000@flexnet.trustedfirmware.org'
54 - 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
Saul Romero3c233982023-06-28 15:45:33 +010059 default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.4.0.tar.gz'
Saul Romero33f858f2023-02-06 11:15:47 +000060 - string:
61 name: GERRIT_PATCHSET_NUMBER
62 default: ''
63 - string:
64 name: GERRIT_CHANGE_NUMBER
65 default: ''
66 - string:
67 name: GERRIT_HOST
68 default: 'review.trustedfirmware.org'
69 - string:
70 name: QA_SERVER_TEAM
71 default: 'tf'
72 - string:
73 name: QA_SERVER_PROJECT
74 default: 'tf-a'
75 - string:
76 name: QA_SERVER_VERSION
77 default: ${BUILD_NUMBER}
78 - string:
79 name: QA_SERVER
80 default: 'https://qa-reports.linaro.org'
81 - string:
82 name: QA_TOOLS_REPO
Saul Romero3c233982023-06-28 15:45:33 +010083 default: 'https://git.gitlab.arm.com/tooling/qa-tools.git'
Saul Romeroe0faac72023-03-17 15:27:05 +000084 - string:
85 name: QA_TOOLS_BRANCH
Saul Romero3c233982023-06-28 15:45:33 +010086 default: 'master'
Saul Romero33f858f2023-02-06 11:15:47 +000087 - string:
88 name: SHARE_FOLDER
89 default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}'
90 description: 'Folder containing shared repositories for downstream pipeline jobs'
91 wrappers:
92 - timestamps
93 - timeout:
94 timeout: 120
95 fail: true
96 - credentials-binding:
97 - text:
98 credential-id: QA_REPORTS_TOKEN
99 variable: QA_REPORTS_TOKEN
100 - credentials-binding:
101 - text:
102 credential-id: LAVA_USER_TF
103 variable: LAVA_USER
104 - credentials-binding:
105 - text:
106 credential-id: LAVA_TOKEN_TF
107 variable: LAVA_TOKEN
108 builders:
Saul Romero3c233982023-06-28 15:45:33 +0100109 - shell: |
110 aarch64-none-elf-gcc -v || true
Saul Romero33f858f2023-02-06 11:15:47 +0000111 - shell:
Saul Romero0b8a6d72023-02-10 10:04:27 +0000112 !include-raw: saurom-scripts/clone.sh
Saul Romero33f858f2023-02-06 11:15:47 +0000113 - shell:
Saul Romero4d3656e2023-02-07 13:13:56 +0000114 !include-raw: saurom-tf-a-builder/builders.sh
Saul Romero33f858f2023-02-06 11:15:47 +0000115 - inject:
116 properties-file: artefacts/env
117 - shell: |
118 ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
Saul Romero3c233982023-06-28 15:45:33 +0100119 echo ${BIN_MODE:-release} >lava-binmode.txt
Saul Romero33f858f2023-02-06 11:15:47 +0000120 - conditional-step:
121 condition-kind: file-exists
122 on-evaluation-failure: dont-run
123 condition-filename: artefacts-lava/job.yaml
124 condition-basedir: workspace
125 steps:
126 - shell: |
127 #!/bin/bash
128 set -e
Saul Romerod4e90522023-06-29 11:36:44 +0100129 set -x
Saul Romero77e64252023-06-30 12:25:48 +0100130 cat ${WORKSPACE}/artefacts-lava/job.yaml
Saul Romero33f858f2023-02-06 11:15:47 +0000131 DEVICE_TYPE=fvp
132 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
133 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
134 cat << EOF > ${WORKSPACE}/lava.param
135 DEVICE_TYPE=${DEVICE_TYPE}
136 LAVA_SERVER=tf.validation.linaro.org
137 EOF
138 publishers:
139 - archive:
Saul Romero3c233982023-06-28 15:45:33 +0100140 artifacts: artefacts/**, artefacts-lava/**, lava-binmode.txt
Saul Romero33f858f2023-02-06 11:15:47 +0000141 latest-only: false
142 allow-empty: true
143 - conditional-publisher:
144 - condition-kind: file-exists
145 on-evaluation-failure: dont-run
146 condition-filename: artefacts-lava/job.yaml
147 condition-basedir: workspace
148 action:
149 - postbuildscript:
150 builders:
151 - role: SLAVE
152 build-on:
153 - SUCCESS
154 build-steps:
155 - inject:
156 properties-file: ${WORKSPACE}/lava.param
157 - shell: |
158 #!/bin/bash
Saul Romerod4e90522023-06-29 11:36:44 +0100159 set -x
Saul Romero3c233982023-06-28 15:45:33 +0100160 submit_job='tf-a-job-configs/saurom-tf-a-builder/submit-test-job.sh'
Saul Romero33f858f2023-02-06 11:15:47 +0000161 # FIXME: Juno and FVP jobs may fail due to non-related users changes,
162 # so CI needs to resubmit the job, at most three times:
163 # Juno jobs may fail due to LAVA lab infrastructure issues (see
164 # https://projects.linaro.org/browse/LSS-2128)
165 # FVP jobs may hang at some particular TFTF test (see
166 # https://linaro.atlassian.net/browse/TFC-176)
Saul Romeroe0faac72023-03-17 15:27:05 +0000167 passed=0
168 for i in $(seq 1 3); do
Saul Romero3c233982023-06-28 15:45:33 +0100169 echo "# LAVA submission iteration #$i"
170 if $submit_job; then
Saul Romeroe0faac72023-03-17 15:27:05 +0000171 passed=1
172 break
Saul Romero33f858f2023-02-06 11:15:47 +0000173 fi
Saul Romeroe0faac72023-03-17 15:27:05 +0000174 done
Saul Romero3c233982023-06-28 15:45:33 +0100175 tf-a-job-configs/saurom-tf-a-builder/lava-log-process.sh
Saul Romeroe0faac72023-03-17 15:27:05 +0000176 if [ $passed -eq 0 ]; then
177 echo "LAVA JOB RESULT: 1"
Saul Romero3c233982023-06-28 15:45:33 +0100178 exit 1
Saul Romero33f858f2023-02-06 11:15:47 +0000179 else
180 echo "LAVA JOB RESULT: 0"
181 fi
182 - postbuildscript:
183 builders:
184 - role: SLAVE
185 build-on:
186 - SUCCESS
187 build-steps:
188 - shell: |
189 #!/bin/bash -e
190 echo "=== Starting expect-post tests ==="
191 ./tf-a-ci-scripts/script/expect-post-runner.sh
192 - conditional-publisher:
193 - condition-kind: file-exists
194 on-evaluation-failure: dont-run
195 condition-filename: lava-raw-debug.log
196 condition-basedir: workspace
197 action:
198 - archive:
Saul Romeroe0faac72023-03-17 15:27:05 +0000199 artifacts: lava-raw-debug.log
Saul Romero33f858f2023-02-06 11:15:47 +0000200 latest-only: false
201 allow-empty: true
Saul Romeroe0faac72023-03-17 15:27:05 +0000202 - archive:
203 artifacts: lava.log, lava-*.log, feedback.log, config_file.json, covtrace-*.log, trace_report/**,lava.log, lava-uart?.log, feedback.log, config_file.json, covtrace-*.log, trace_report/**, *.dump, *.json, *.info
204 latest-only: false
205 allow-empty: true
Saul Romero33f858f2023-02-06 11:15:47 +0000206 - groovy-postbuild:
207 script:
208 !include-raw:
209 - tf-a-builder/postbuild.groovy