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