blob: d461e4f89357f67b3657344f7522e0ce84c244fd [file] [log] [blame]
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +03001- job:
Paul Sokolovskyc9503ee2023-11-17 22:44:39 +03002 name: tf-a-eclair-delta-separate
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +03003 project-type: matrix
4 concurrent: true
Paul Sokolovskyad5638f2024-10-22 12:34:15 +07005 disabled: true
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +03006 defaults: global
Paul Sokolovskyd9f65b52024-10-22 13:50:58 +07007 description: |
Paul Sokolovskyc9503ee2023-11-17 22:44:39 +03008 ECLAIR (MISRA compliance) testing of TF-A patches (different configs built independently/separately)
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +03009 properties:
10 - build-discarder:
11 days-to-keep: 45
12 num-to-keep: 200
Paul Sokolovskycfd10672023-01-23 23:00:29 +070013 artifact-num-to-keep: 80
Paul Sokolovsky8a1dda02022-10-20 20:20:19 +030014 - throttle:
15 option: category
16 categories: [eclair]
17 matrix-builds: false
18 matrix-configs: true
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +030019 parameters:
20 - string:
21 name: MAKE_TARGET
22 default: ''
23 description: |
24 TF-A make target
25 - string:
Paul Sokolovsky30e68432022-10-29 18:51:21 +030026 name: DEBUG
Paul Sokolovsky3ad69292022-10-31 22:48:32 +030027 default: '1'
Paul Sokolovsky30e68432022-10-29 18:51:21 +030028 description: |
29 TF-A make DEBUG setting
30 - string:
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +030031 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 Sokolovsky0b880652022-10-30 09:06:44 +030047 name: GERRIT_CHANGE_NUMBER
48 default: ''
49 - string:
50 name: GERRIT_PATCHSET_NUMBER
51 default: ''
52 - string:
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +030053 name: MBEDTLS_URL
Paul Sokolovsky3d48d0b2023-11-15 20:43:08 +030054 default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.4.1.tar.gz'
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +030055 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 Babufd524222025-01-21 23:42:41 +000079 branch-pattern: openci-migration
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +030080 project-compare-type: PLAIN
Saheer Babufd524222025-01-21 23:42:41 +000081 project-pattern: 'next/TF-A/trusted-firmware-a'
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +030082 - 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 Sokolovskyc455e9f2023-03-02 15:29:38 +070091 - comment-added-event:
92 approval-category: "Allow-CI"
93 approval-value: 2
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +030094 wrappers:
95 - timestamps
96 - timeout:
Paul Sokolovsky7a037432023-02-20 15:23:52 +070097 timeout: 150
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +030098 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 Sokolovsky5e7cf7f2023-06-30 15:43:34 +0300112 git clone https://git.trustedfirmware.org/ci/tf-ci-scripts.git
113
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +0300114 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 Sokolovsky5e7cf7f2023-06-30 15:43:34 +0300122
Paul Sokolovsky6f3b7242023-07-01 16:37:45 +0300123 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 Sokolovsky7a037432023-02-20 15:23:52 +0700128 detachLicense 9000
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +0300129 trap "returnLicense || true" EXIT
Paul Sokolovsky6f3b7242023-07-01 16:37:45 +0300130
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 Sokolovskye0ab23a2022-10-18 21:44:32 +0300156 returnLicense
Paul Sokolovskya9272282023-07-02 23:16:42 +0300157 tf-ci-scripts/eclair/analyze_delta_index_html.sh
Paul Sokolovskyd3ea19f2023-07-02 12:46:28 +0300158 tf-ci-scripts/eclair/post_gerrit_comment.sh
Paul Sokolovskye0ab23a2022-10-18 21:44:32 +0300159 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