Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 1 | - job: |
| 2 | name: tf-a-eclair-delta |
Paul Sokolovsky | d3f0b00 | 2024-01-08 23:49:00 +0300 | [diff] [blame] | 3 | node: docker-tf-a-eclair-3.13 |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 4 | project-type: freestyle |
| 5 | concurrent: true |
| 6 | disabled: false |
| 7 | defaults: global |
Paul Sokolovsky | d9f65b5 | 2024-10-22 13:50:58 +0700 | [diff] [blame] | 8 | description: | |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 9 | ECLAIR (MISRA compliance) testing of TF-A patches |
| 10 | properties: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 11 | - build-discarder: |
| 12 | days-to-keep: 45 |
| 13 | num-to-keep: 200 |
| 14 | artifact-num-to-keep: 80 |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 15 | parameters: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 16 | - string: |
| 17 | name: TF_CONFIG_LIST |
| 18 | default: | |
| 19 | fvp-tbb-mbedtls-rme-romlib fvp-spm-spmd-lsp fvp-pauth-bti-sdei fvp-aarch32-roxlattables |
| 20 | - string: |
| 21 | name: MAKE_TARGET |
| 22 | default: "" |
| 23 | description: | |
| 24 | TF-A make target |
| 25 | - string: |
| 26 | name: MAKE_JOBS |
| 27 | default: "16" |
| 28 | description: | |
| 29 | --jobs to pass to make, etc. |
| 30 | - string: |
| 31 | name: DEBUG |
| 32 | default: "1" |
| 33 | description: | |
| 34 | TF-A make DEBUG setting |
| 35 | - string: |
| 36 | name: GERRIT_HOST |
| 37 | default: review.trustedfirmware.org |
| 38 | - string: |
| 39 | name: GERRIT_PROJECT |
| 40 | default: TF-A/trusted-firmware-a |
| 41 | description: | |
| 42 | Git project to build (also set by Gerrit trigger) |
| 43 | - string: |
| 44 | name: GERRIT_BRANCH |
| 45 | default: integration |
| 46 | description: | |
| 47 | Git branch to build (also set by Gerrit trigger) |
| 48 | - string: |
| 49 | name: GERRIT_REFSPEC |
| 50 | default: "" |
| 51 | - string: |
| 52 | name: GERRIT_CHANGE_NUMBER |
| 53 | default: "" |
| 54 | - string: |
| 55 | name: GERRIT_PATCHSET_NUMBER |
| 56 | default: "" |
| 57 | - string: |
| 58 | name: MBEDTLS_URL |
| 59 | default: https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.6.3.tar.gz |
| 60 | description: | |
| 61 | URL of mbedTLS library to use in build (only for some configurations) |
| 62 | - string: |
| 63 | name: SHARE_FOLDER |
| 64 | default: /srv/shared/${JOB_NAME}/${BUILD_NUMBER} |
| 65 | description: Folder containing shared repositories for downstream pipeline jobs |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 66 | triggers: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 67 | - gerrit: |
| 68 | silent: true |
| 69 | server-name: review.trustedfirmware.org |
| 70 | projects: |
| 71 | - branches: |
| 72 | - branch-compare-type: PLAIN |
| 73 | branch-pattern: integration |
| 74 | project-compare-type: PLAIN |
| 75 | project-pattern: TF-A/trusted-firmware-a |
| 76 | - branches: |
| 77 | - branch-compare-type: PLAIN |
| 78 | branch-pattern: integration |
| 79 | project-compare-type: PLAIN |
| 80 | project-pattern: sandbox/pfalcon/trusted-firmware-a |
| 81 | trigger-on: |
| 82 | - comment-added-event: |
| 83 | approval-category: Allow-CI |
| 84 | approval-value: 1 |
| 85 | - comment-added-event: |
| 86 | approval-category: Allow-CI |
| 87 | approval-value: 2 |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 88 | wrappers: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 89 | - timestamps |
| 90 | - timeout: |
| 91 | timeout: 330 |
| 92 | fail: true |
| 93 | - credentials-binding: |
| 94 | - ssh-user-private-key: |
| 95 | credential-id: TFA_CI_BOT_USER_SSH_KEY |
| 96 | key-file-variable: CI_BOT_KEY |
| 97 | username-variable: CI_BOT_USERNAME |
| 98 | passphrase-variable: "" |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 99 | builders: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 100 | - shell: | |
| 101 | #!/bin/bash |
| 102 | set -ex |
| 103 | export PATH=~/.local/bin:$PATH |
| 104 | pwd |
| 105 | env | grep GERRIT |
| 106 | git clone https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git |
| 107 | git clone https://git.trustedfirmware.org/ci/tf-ci-scripts.git |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 108 | |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 109 | git clone https://${GERRIT_HOST}/${GERRIT_PROJECT} -b ${GERRIT_BRANCH} |
| 110 | if [ -n "${GERRIT_REFSPEC}" ]; then |
| 111 | ( |
| 112 | cd $(basename ${GERRIT_PROJECT}) |
| 113 | git fetch https://${GERRIT_HOST}/${GERRIT_PROJECT} ${GERRIT_REFSPEC} && git checkout FETCH_HEAD |
| 114 | ) |
| 115 | fi |
| 116 | (cd trusted-firmware-a; git log --oneline -n5) |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 117 | |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 118 | export ECLAIR_CONFIG_DIR=$PWD/tf-a-ci-scripts/eclair |
| 119 | . tf-ci-scripts/eclair/utils.sh |
| 120 | # TODO |
| 121 | #. tf-a-ci-scripts/eclair/utils_tfa.sh |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 122 | |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 123 | . tf-a-ci-scripts/eclair/eclair_vars.sh |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 124 | |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 125 | detachLicense 600 |
| 126 | trap "returnLicense || true" EXIT |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 127 | |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 128 | export ECLAIR_ANALYSIS=ECLAIR |
| 129 | eclair_prepare |
| 130 | eclair_analyze tf-a-ci-scripts/eclair/build-tfa-multiple.sh |
| 131 | eclair_make_ecd |
| 132 | eclair_make_reports |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 133 | |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 134 | echo "========= Building base revision =========" |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 135 | |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 136 | ( |
| 137 | cd $(basename ${GERRIT_PROJECT}) |
| 138 | git checkout HEAD^ |
| 139 | git log --oneline -n5 |
| 140 | ) |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 141 | |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 142 | export ECLAIR_ANALYSIS=ECLAIR_BASE |
| 143 | eclair_prepare |
| 144 | eclair_analyze tf-a-ci-scripts/eclair/build-tfa-multiple.sh |
| 145 | eclair_make_ecd |
| 146 | eclair_make_reports |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 147 | |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 148 | eclair_make_delta_report ECLAIR_BASE ECLAIR |
| 149 | tf-ci-scripts/eclair/eclair_diff_report.py diff_output > misra_delta.txt |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 150 | |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 151 | returnLicense |
| 152 | tf-ci-scripts/eclair/analyze_delta_index_html.sh |
| 153 | tf-ci-scripts/eclair/post_gerrit_comment.sh |
Paul Sokolovsky | 6349852 | 2023-11-17 22:47:59 +0300 | [diff] [blame] | 154 | publishers: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 155 | - archive: |
| 156 | artifacts: ECLAIR*/**, diff_output/**, misra_delta.txt, *issues_html/**, index.html |
| 157 | excludes: ECLAIR/out/.data/** |
| 158 | latest-only: false |
| 159 | allow-empty: true |