Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 1 | - job: |
| 2 | name: saurom-tf-a-builder |
Saul Romero | 97ecc7e | 2023-03-09 10:48:19 +0000 | [diff] [blame] | 3 | node: docker-amd64-tf-a-jammy |
Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 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 |
Saul Romero | e0faac7 | 2023-03-17 15:27:05 +0000 | [diff] [blame] | 13 | artifact-num-to-keep: 40000 |
Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 14 | - 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 Romero | 3c23398 | 2023-06-28 15:45:33 +0100 | [diff] [blame] | 46 | name: CI_REFSPEC |
| 47 | default: '+refs/heads/master:refs/remotes/origin/master' |
| 48 | - string: |
Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 49 | 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 Romero | 3c23398 | 2023-06-28 15:45:33 +0100 | [diff] [blame] | 59 | default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.4.0.tar.gz' |
Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 60 | - 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 Romero | 3c23398 | 2023-06-28 15:45:33 +0100 | [diff] [blame] | 83 | default: 'https://git.gitlab.arm.com/tooling/qa-tools.git' |
Saul Romero | e0faac7 | 2023-03-17 15:27:05 +0000 | [diff] [blame] | 84 | - string: |
| 85 | name: QA_TOOLS_BRANCH |
Saul Romero | 3c23398 | 2023-06-28 15:45:33 +0100 | [diff] [blame] | 86 | default: 'master' |
Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 87 | - 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 Romero | 3c23398 | 2023-06-28 15:45:33 +0100 | [diff] [blame] | 109 | - shell: | |
| 110 | aarch64-none-elf-gcc -v || true |
Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 111 | - shell: |
Saul Romero | 0b8a6d7 | 2023-02-10 10:04:27 +0000 | [diff] [blame] | 112 | !include-raw: saurom-scripts/clone.sh |
Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 113 | - shell: |
Saul Romero | 4d3656e | 2023-02-07 13:13:56 +0000 | [diff] [blame] | 114 | !include-raw: saurom-tf-a-builder/builders.sh |
Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 115 | - inject: |
| 116 | properties-file: artefacts/env |
| 117 | - shell: | |
| 118 | ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava" |
Saul Romero | 3c23398 | 2023-06-28 15:45:33 +0100 | [diff] [blame] | 119 | echo ${BIN_MODE:-release} >lava-binmode.txt |
Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 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 |
Saul Romero | d4e9052 | 2023-06-29 11:36:44 +0100 | [diff] [blame] | 129 | set -x |
| 130 | echo "saurom01-tf-a-builder" |
Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 131 | 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 Romero | 3c23398 | 2023-06-28 15:45:33 +0100 | [diff] [blame] | 140 | artifacts: artefacts/**, artefacts-lava/**, lava-binmode.txt |
Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 141 | 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 Romero | d4e9052 | 2023-06-29 11:36:44 +0100 | [diff] [blame] | 159 | set -x |
Saul Romero | 3c23398 | 2023-06-28 15:45:33 +0100 | [diff] [blame] | 160 | submit_job='tf-a-job-configs/saurom-tf-a-builder/submit-test-job.sh' |
Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 161 | # 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 Romero | e0faac7 | 2023-03-17 15:27:05 +0000 | [diff] [blame] | 167 | passed=0 |
| 168 | for i in $(seq 1 3); do |
Saul Romero | 3c23398 | 2023-06-28 15:45:33 +0100 | [diff] [blame] | 169 | echo "# LAVA submission iteration #$i" |
| 170 | if $submit_job; then |
Saul Romero | e0faac7 | 2023-03-17 15:27:05 +0000 | [diff] [blame] | 171 | passed=1 |
| 172 | break |
Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 173 | fi |
Saul Romero | e0faac7 | 2023-03-17 15:27:05 +0000 | [diff] [blame] | 174 | done |
Saul Romero | 3c23398 | 2023-06-28 15:45:33 +0100 | [diff] [blame] | 175 | tf-a-job-configs/saurom-tf-a-builder/lava-log-process.sh |
Saul Romero | e0faac7 | 2023-03-17 15:27:05 +0000 | [diff] [blame] | 176 | if [ $passed -eq 0 ]; then |
| 177 | echo "LAVA JOB RESULT: 1" |
Saul Romero | 3c23398 | 2023-06-28 15:45:33 +0100 | [diff] [blame] | 178 | exit 1 |
Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 179 | 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 Romero | e0faac7 | 2023-03-17 15:27:05 +0000 | [diff] [blame] | 199 | artifacts: lava-raw-debug.log |
Saul Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 200 | latest-only: false |
| 201 | allow-empty: true |
Saul Romero | e0faac7 | 2023-03-17 15:27:05 +0000 | [diff] [blame] | 202 | - 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 Romero | 33f858f | 2023-02-06 11:15:47 +0000 | [diff] [blame] | 206 | - groovy-postbuild: |
| 207 | script: |
| 208 | !include-raw: |
| 209 | - tf-a-builder/postbuild.groovy |