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