Fathi Boudra | 9e402bf | 2019-12-05 11:16:41 +0200 | [diff] [blame] | 1 | - job: |
| 2 | name: tf-a-builder |
Boyan Karatotev | 5c87c07 | 2023-02-10 11:04:58 +0000 | [diff] [blame] | 3 | node: docker-amd64-tf-a-jammy |
Fathi Boudra | 9e402bf | 2019-12-05 11:16:41 +0200 | [diff] [blame] | 4 | project-type: freestyle |
Leonardo Sandoval | dc2a03a | 2020-10-05 18:12:19 -0500 | [diff] [blame] | 5 | concurrent: true |
| 6 | disabled: false |
Fathi Boudra | 9e402bf | 2019-12-05 11:16:41 +0200 | [diff] [blame] | 7 | defaults: global |
Leonardo Sandoval | dc2a03a | 2020-10-05 18:12:19 -0500 | [diff] [blame] | 8 | Description: | |
| 9 | Trusted Firmware A (TF-A) builder |
Fathi Boudra | 9e402bf | 2019-12-05 11:16:41 +0200 | [diff] [blame] | 10 | properties: |
| 11 | - build-discarder: |
Benjamin Copeland | 12a152f | 2022-03-18 13:16:44 +0000 | [diff] [blame] | 12 | days-to-keep: 15 |
Paul Sokolovsky | 2b0d011 | 2023-01-23 23:08:49 +0700 | [diff] [blame] | 13 | artifact-num-to-keep: 40000 |
Riku Voipio | bc87be2 | 2020-09-04 15:56:09 +0300 | [diff] [blame] | 14 | - authorization: |
Leonardo Sandoval | ebca882 | 2021-01-25 18:20:04 -0600 | [diff] [blame] | 15 | !include: authorization.yaml.inc |
Fathi Boudra | 9e402bf | 2019-12-05 11:16:41 +0200 | [diff] [blame] | 16 | parameters: |
| 17 | - string: |
Leonardo Sandoval | afdd5ce | 2020-07-06 11:35:36 -0500 | [diff] [blame] | 18 | name: import_cc |
Leonardo Sandoval | afdd5ce | 2020-07-06 11:35:36 -0500 | [diff] [blame] | 19 | - string: |
Paul Sokolovsky | 7be2e05 | 2021-11-08 14:45:01 +0300 | [diff] [blame] | 20 | name: TEST_CONFIG |
| 21 | description: | |
| 22 | Original test configuration. |
| 23 | - string: |
Leonardo Sandoval | dc2a03a | 2020-10-05 18:12:19 -0500 | [diff] [blame] | 24 | name: TEST_DESC |
Paul Sokolovsky | 7be2e05 | 2021-11-08 14:45:01 +0300 | [diff] [blame] | 25 | description: | |
| 26 | Expanded and normalized test configuration, aka "test description" |
Fathi Boudra | 18eca5c | 2020-01-16 17:50:42 +0200 | [diff] [blame] | 27 | - string: |
Leonardo Sandoval | dc2a03a | 2020-10-05 18:12:19 -0500 | [diff] [blame] | 28 | name: TF_GERRIT_PROJECT |
Fathi Boudra | 18eca5c | 2020-01-16 17:50:42 +0200 | [diff] [blame] | 29 | default: 'TF-A/trusted-firmware-a' |
| 30 | - string: |
Leonardo Sandoval | dc2a03a | 2020-10-05 18:12:19 -0500 | [diff] [blame] | 31 | name: TF_GERRIT_BRANCH |
Fathi Boudra | 18eca5c | 2020-01-16 17:50:42 +0200 | [diff] [blame] | 32 | default: 'refs/heads/master' |
Leonardo Sandoval | dc2a03a | 2020-10-05 18:12:19 -0500 | [diff] [blame] | 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 |
Riku Voipio | af06a08 | 2021-08-24 13:58:13 +0300 | [diff] [blame] | 50 | default: '27000@flexnet.trustedfirmware.org' |
Leonardo Sandoval | dc2a03a | 2020-10-05 18:12:19 -0500 | [diff] [blame] | 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 Raja | e7f0474 | 2023-02-09 09:59:25 +0000 | [diff] [blame] | 56 | default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.3.0.tar.gz' |
Milosz Wasilewski | 1043858 | 2020-12-03 11:36:21 +0000 | [diff] [blame] | 57 | - string: |
| 58 | name: GERRIT_PATCHSET_NUMBER |
| 59 | default: '' |
| 60 | - string: |
| 61 | name: GERRIT_CHANGE_NUMBER |
| 62 | default: '' |
| 63 | - string: |
Milosz Wasilewski | 204a27e | 2020-12-10 10:29:45 +0000 | [diff] [blame] | 64 | name: GERRIT_HOST |
| 65 | default: 'review.trustedfirmware.org' |
| 66 | - string: |
Milosz Wasilewski | 1043858 | 2020-12-03 11:36:21 +0000 | [diff] [blame] | 67 | name: QA_SERVER_TEAM |
| 68 | default: 'tf' |
| 69 | - string: |
| 70 | name: QA_SERVER_PROJECT |
| 71 | default: 'tf-a' |
| 72 | - string: |
Leonardo Sandoval | 3791fe4 | 2021-05-12 11:52:54 -0500 | [diff] [blame] | 73 | name: QA_SERVER_VERSION |
| 74 | default: ${BUILD_NUMBER} |
| 75 | - string: |
Milosz Wasilewski | 1043858 | 2020-12-03 11:36:21 +0000 | [diff] [blame] | 76 | name: QA_SERVER |
| 77 | default: 'https://qa-reports.linaro.org' |
Leonardo Sandoval | 425ed9f | 2021-09-06 17:48:10 -0500 | [diff] [blame] | 78 | - string: |
| 79 | name: QA_TOOLS_REPO |
Paul Sokolovsky | 8fb2fb8 | 2023-03-24 15:59:29 +0700 | [diff] [blame] | 80 | default: 'https://git.gitlab.arm.com/tooling/qa-tools.git' |
Leonardo Sandoval | d1b6b5a | 2021-09-13 12:06:26 -0500 | [diff] [blame] | 81 | - string: |
Paul Sokolovsky | fc8db3e | 2023-02-10 23:39:30 +0700 | [diff] [blame] | 82 | name: QA_TOOLS_BRANCH |
Paul Sokolovsky | 8fb2fb8 | 2023-03-24 15:59:29 +0700 | [diff] [blame] | 83 | default: 'master' |
Paul Sokolovsky | fc8db3e | 2023-02-10 23:39:30 +0700 | [diff] [blame] | 84 | - string: |
Leonardo Sandoval | d1b6b5a | 2021-09-13 12:06:26 -0500 | [diff] [blame] | 85 | name: SHARE_FOLDER |
| 86 | default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}' |
| 87 | description: 'Folder containing shared repositories for downstream pipeline jobs' |
Fathi Boudra | 9e402bf | 2019-12-05 11:16:41 +0200 | [diff] [blame] | 88 | wrappers: |
| 89 | - timestamps |
Fathi Boudra | b4e04c0 | 2021-02-11 16:32:12 +0100 | [diff] [blame] | 90 | - timeout: |
| 91 | timeout: 120 |
| 92 | fail: true |
Milosz Wasilewski | 1043858 | 2020-12-03 11:36:21 +0000 | [diff] [blame] | 93 | - credentials-binding: |
| 94 | - text: |
| 95 | credential-id: QA_REPORTS_TOKEN |
| 96 | variable: QA_REPORTS_TOKEN |
Leonardo Sandoval | 9f15980 | 2021-01-20 16:47:25 -0600 | [diff] [blame] | 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 |
Fathi Boudra | 9e402bf | 2019-12-05 11:16:41 +0200 | [diff] [blame] | 105 | builders: |
| 106 | - shell: |
Leonardo Sandoval | d1b6b5a | 2021-09-13 12:06:26 -0500 | [diff] [blame] | 107 | !include-raw: scripts/clone.sh |
| 108 | - shell: |
Fathi Boudra | 9e402bf | 2019-12-05 11:16:41 +0200 | [diff] [blame] | 109 | !include-raw: tf-a-builder/builders.sh |
Chris Kay | f6ff467 | 2022-11-03 13:09:44 +0000 | [diff] [blame] | 110 | - inject: |
| 111 | properties-file: artefacts/env |
| 112 | - shell: | |
| 113 | ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava" |
Leonardo Sandoval | dc2a03a | 2020-10-05 18:12:19 -0500 | [diff] [blame] | 114 | - conditional-step: |
| 115 | condition-kind: file-exists |
| 116 | on-evaluation-failure: dont-run |
Chris Kay | f6ff467 | 2022-11-03 13:09:44 +0000 | [diff] [blame] | 117 | condition-filename: artefacts-lava/job.yaml |
Leonardo Sandoval | dc2a03a | 2020-10-05 18:12:19 -0500 | [diff] [blame] | 118 | condition-basedir: workspace |
| 119 | steps: |
| 120 | - shell: | |
| 121 | #!/bin/bash |
Leonardo Sandoval | dc2a03a | 2020-10-05 18:12:19 -0500 | [diff] [blame] | 122 | set -e |
Leonardo Sandoval | dc2a03a | 2020-10-05 18:12:19 -0500 | [diff] [blame] | 123 | DEVICE_TYPE=fvp |
Chris Kay | f6ff467 | 2022-11-03 13:09:44 +0000 | [diff] [blame] | 124 | CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml |
| 125 | DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml) |
Fathi Boudra | f5537c3 | 2021-01-21 09:28:05 +0100 | [diff] [blame] | 126 | cat << EOF > ${WORKSPACE}/lava.param |
Leonardo Sandoval | dc2a03a | 2020-10-05 18:12:19 -0500 | [diff] [blame] | 127 | DEVICE_TYPE=${DEVICE_TYPE} |
Milosz Wasilewski | 1043858 | 2020-12-03 11:36:21 +0000 | [diff] [blame] | 128 | LAVA_SERVER=tf.validation.linaro.org |
Leonardo Sandoval | dc2a03a | 2020-10-05 18:12:19 -0500 | [diff] [blame] | 129 | EOF |
Fathi Boudra | 9e402bf | 2019-12-05 11:16:41 +0200 | [diff] [blame] | 130 | publishers: |
| 131 | - archive: |
Chris Kay | f6ff467 | 2022-11-03 13:09:44 +0000 | [diff] [blame] | 132 | artifacts: artefacts/**, artefacts-lava/** |
Fathi Boudra | 9e402bf | 2019-12-05 11:16:41 +0200 | [diff] [blame] | 133 | latest-only: false |
Leonardo Sandoval | dc2a03a | 2020-10-05 18:12:19 -0500 | [diff] [blame] | 134 | allow-empty: true |
| 135 | - conditional-publisher: |
| 136 | - condition-kind: file-exists |
| 137 | on-evaluation-failure: dont-run |
Chris Kay | f6ff467 | 2022-11-03 13:09:44 +0000 | [diff] [blame] | 138 | condition-filename: artefacts-lava/job.yaml |
Leonardo Sandoval | dc2a03a | 2020-10-05 18:12:19 -0500 | [diff] [blame] | 139 | condition-basedir: workspace |
| 140 | action: |
Milosz Wasilewski | 1043858 | 2020-12-03 11:36:21 +0000 | [diff] [blame] | 141 | - postbuildscript: |
| 142 | builders: |
| 143 | - role: SLAVE |
| 144 | build-on: |
| 145 | - SUCCESS |
| 146 | build-steps: |
| 147 | - inject: |
Fathi Boudra | f5537c3 | 2021-01-21 09:28:05 +0100 | [diff] [blame] | 148 | properties-file: ${WORKSPACE}/lava.param |
Leonardo Sandoval | e945013 | 2021-04-19 13:51:11 -0500 | [diff] [blame] | 149 | - shell: | |
| 150 | #!/bin/bash |
| 151 | |
| 152 | squad='tf-a-job-configs/tf-a-builder/squad.sh' |
Leonardo Sandoval | 60e35df | 2021-10-04 10:49:14 -0500 | [diff] [blame] | 153 | # FIXME: Juno and FVP jobs may fail due to non-related users changes, |
| 154 | # so CI needs to resubmit the job, at most three times: |
| 155 | # Juno jobs may fail due to LAVA lab infrastructure issues (see |
| 156 | # https://projects.linaro.org/browse/LSS-2128) |
| 157 | # FVP jobs may hang at some particular TFTF test (see |
| 158 | # https://linaro.atlassian.net/browse/TFC-176) |
Paul Sokolovsky | 3f40cc7 | 2022-12-08 21:54:43 +0300 | [diff] [blame] | 159 | passed=0 |
Paul Sokolovsky | 55aacde | 2023-02-13 08:21:48 +0100 | [diff] [blame] | 160 | for i in $(seq 1 3); do |
Paul Sokolovsky | 3f40cc7 | 2022-12-08 21:54:43 +0300 | [diff] [blame] | 161 | echo "# SQUAD submission iteration #$i" |
| 162 | if $squad; then |
| 163 | passed=1 |
| 164 | break |
Leonardo Sandoval | e945013 | 2021-04-19 13:51:11 -0500 | [diff] [blame] | 165 | fi |
Paul Sokolovsky | 3f40cc7 | 2022-12-08 21:54:43 +0300 | [diff] [blame] | 166 | done |
Paul Sokolovsky | 05cafdf | 2023-03-16 16:49:30 +0700 | [diff] [blame] | 167 | tf-a-job-configs/tf-a-builder/lava-log-process.sh |
Paul Sokolovsky | 3f40cc7 | 2022-12-08 21:54:43 +0300 | [diff] [blame] | 168 | if [ $passed -eq 0 ]; then |
| 169 | echo "LAVA JOB RESULT: 1" |
Leonardo Sandoval | e945013 | 2021-04-19 13:51:11 -0500 | [diff] [blame] | 170 | else |
| 171 | echo "LAVA JOB RESULT: 0" |
| 172 | fi |
Paul Sokolovsky | c4df9f7 | 2021-11-16 16:35:57 +0300 | [diff] [blame] | 173 | - postbuildscript: |
| 174 | builders: |
| 175 | - role: SLAVE |
| 176 | build-on: |
| 177 | - SUCCESS |
| 178 | build-steps: |
| 179 | - shell: | |
Paul Sokolovsky | c8e985d | 2021-12-14 16:46:28 +0300 | [diff] [blame] | 180 | #!/bin/bash -e |
Paul Sokolovsky | c4df9f7 | 2021-11-16 16:35:57 +0300 | [diff] [blame] | 181 | echo "=== Starting expect-post tests ===" |
| 182 | ./tf-a-ci-scripts/script/expect-post-runner.sh |
Leonardo Sandoval | 9f15980 | 2021-01-20 16:47:25 -0600 | [diff] [blame] | 183 | - conditional-publisher: |
| 184 | - condition-kind: file-exists |
| 185 | on-evaluation-failure: dont-run |
Arthur She | 2586b5c | 2021-05-11 21:00:20 -0700 | [diff] [blame] | 186 | condition-filename: lava-raw-debug.log |
| 187 | condition-basedir: workspace |
| 188 | action: |
| 189 | - archive: |
| 190 | artifacts: lava-raw-debug.log |
| 191 | latest-only: false |
| 192 | allow-empty: true |
Paul Sokolovsky | 05cafdf | 2023-03-16 16:49:30 +0700 | [diff] [blame] | 193 | - archive: |
| 194 | artifacts: lava.log, lava-*.log, feedback.log, config_file.json, covtrace-*.log, trace_report/** |
| 195 | latest-only: false |
| 196 | allow-empty: true |
Milosz Wasilewski | 1043858 | 2020-12-03 11:36:21 +0000 | [diff] [blame] | 197 | - groovy-postbuild: |
| 198 | script: |
| 199 | !include-raw: |
Fathi Boudra | f5537c3 | 2021-01-21 09:28:05 +0100 | [diff] [blame] | 200 | - tf-a-builder/postbuild.groovy |