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