blob: b715e52870bd838d028896f01deee75aab24da5f [file] [log] [blame]
Paul Sokolovskya951a4c2023-06-01 21:34:09 +03001- job:
2 name: tf-a-lts2.8-builder
3 node: docker-amd64-tf-a-lts2.8-jammy
4 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
13 artifact-num-to-keep: 40000
14 - authorization:
15 !include: 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:
46 name: DOCKER_REGISTRY
47 default: '987685672616.dkr.ecr.us-east-1.amazonaws.com'
48 - string:
49 name: ARMLMD_LICENSE_FILE
50 default: '27000@flexnet.trustedfirmware.org'
51 - 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
Govindraj Raja022c4db2023-10-10 16:42:04 -050056 default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-2.28.5.tar.gz'
Paul Sokolovskya951a4c2023-06-01 21:34:09 +030057 - string:
58 name: GERRIT_PATCHSET_NUMBER
59 default: ''
60 - string:
61 name: GERRIT_CHANGE_NUMBER
62 default: ''
63 - string:
64 name: GERRIT_HOST
65 default: 'review.trustedfirmware.org'
66 - string:
67 name: QA_SERVER_TEAM
68 default: 'tf'
69 - string:
70 name: QA_SERVER_PROJECT
71 default: 'tf-a'
72 - string:
73 name: QA_SERVER_VERSION
74 default: ${BUILD_NUMBER}
75 - string:
76 name: QA_SERVER
77 default: 'https://qa-reports.linaro.org'
78 - string:
79 name: QA_TOOLS_REPO
80 default: 'https://git.gitlab.arm.com/tooling/qa-tools.git'
81 - string:
82 name: QA_TOOLS_BRANCH
83 default: 'master'
84 - string:
85 name: SHARE_FOLDER
86 default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}'
87 description: 'Folder containing shared repositories for downstream pipeline jobs'
88 wrappers:
89 - timestamps
90 - timeout:
91 timeout: 120
92 fail: true
93 - credentials-binding:
94 - text:
95 credential-id: QA_REPORTS_TOKEN
96 variable: QA_REPORTS_TOKEN
97 - 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
Paul Sokolovskyf0425882023-11-28 10:29:37 +0300105 - credentials-binding:
106 - text:
107 credential-id: ARMCLANG_UBL_CODE
108 variable: ARMCLANG_UBL_CODE
Paul Sokolovskya951a4c2023-06-01 21:34:09 +0300109 builders:
110 - shell: |
111 aarch64-none-elf-gcc -v || true
112 - shell:
113 !include-raw: scripts/clone.sh
114 - shell:
115 !include-raw: tf-a-builder/builders.sh
116 - inject:
117 properties-file: artefacts/env
118 - shell: |
119 ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
120 - 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
129 DEVICE_TYPE=fvp
130 CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
131 DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
132 cat << EOF > ${WORKSPACE}/lava.param
133 DEVICE_TYPE=${DEVICE_TYPE}
134 LAVA_SERVER=tf.validation.linaro.org
135 EOF
136 publishers:
137 - archive:
138 artifacts: artefacts/**, artefacts-lava/**
139 latest-only: false
140 allow-empty: true
141 - conditional-publisher:
142 - condition-kind: file-exists
143 on-evaluation-failure: dont-run
144 condition-filename: artefacts-lava/job.yaml
145 condition-basedir: workspace
146 action:
147 - postbuildscript:
148 mark-unstable-if-failed: true
149 builders:
150 - role: SLAVE
151 build-on:
152 - SUCCESS
153 build-steps:
154 - inject:
155 properties-file: ${WORKSPACE}/lava.param
156 - shell: |
157 #!/bin/bash
158
159 submit_job='tf-a-job-configs/tf-a-builder/submit-test-job.sh'
160 # FIXME: Juno and FVP jobs may fail due to non-related users changes,
161 # so CI needs to resubmit the job, at most three times:
162 # Juno jobs may fail due to LAVA lab infrastructure issues (see
163 # https://projects.linaro.org/browse/LSS-2128)
164 # FVP jobs may hang at some particular TFTF test (see
165 # https://linaro.atlassian.net/browse/TFC-176)
166 passed=0
167 for i in $(seq 1 3); do
168 echo "# LAVA submission iteration #$i"
169 if $submit_job; then
170 passed=1
171 break
172 fi
173 done
174 tf-a-job-configs/tf-a-builder/lava-log-process.sh
175 if [ $passed -eq 0 ]; then
176 echo "LAVA JOB RESULT: 1"
177 exit 1
178 else
179 echo "LAVA JOB RESULT: 0"
180 fi
181 - postbuildscript:
182 builders:
183 - role: SLAVE
184 build-on:
185 - SUCCESS
186 build-steps:
187 - shell: |
188 #!/bin/bash -e
189 echo "=== Starting expect-post tests ==="
190 ./tf-a-ci-scripts/script/expect-post-runner.sh
191 - conditional-publisher:
192 - condition-kind: file-exists
193 on-evaluation-failure: dont-run
194 condition-filename: lava-raw-debug.log
195 condition-basedir: workspace
196 action:
197 - archive:
198 artifacts: lava-raw-debug.log
199 latest-only: false
200 allow-empty: true
201 - archive:
202 artifacts: lava.log, lava-*.log, feedback.log, config_file.json, covtrace-*.log, trace_report/**
203 latest-only: false
204 allow-empty: true
205 - groovy-postbuild:
206 script:
207 !include-raw:
208 - tf-a-builder/postbuild.groovy