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