blob: c1e23514f67b23120667e72ca5b875613bd440ce [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
Paul Sokolovskyd9f65b52024-10-22 13:50:58 +07008 description: |
Paul Sokolovsky63498522023-11-17 22:47:59 +03009 ECLAIR (MISRA compliance) testing of TF-A patches
10 properties:
Chris Kay675db4f2025-06-24 14:14:34 +010011 - build-discarder:
12 days-to-keep: 45
13 num-to-keep: 200
14 artifact-num-to-keep: 80
Paul Sokolovsky63498522023-11-17 22:47:59 +030015 parameters:
Chris Kay675db4f2025-06-24 14:14:34 +010016 - 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 Sokolovsky63498522023-11-17 22:47:59 +030066 triggers:
Chris Kay675db4f2025-06-24 14:14:34 +010067 - 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 Sokolovsky63498522023-11-17 22:47:59 +030088 wrappers:
Chris Kay675db4f2025-06-24 14:14:34 +010089 - 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 Sokolovsky63498522023-11-17 22:47:59 +030099 builders:
Chris Kay675db4f2025-06-24 14:14:34 +0100100 - 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 Sokolovsky63498522023-11-17 22:47:59 +0300108
Chris Kay675db4f2025-06-24 14:14:34 +0100109 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 Sokolovsky63498522023-11-17 22:47:59 +0300117
Chris Kay675db4f2025-06-24 14:14:34 +0100118 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 Sokolovsky63498522023-11-17 22:47:59 +0300122
Chris Kay675db4f2025-06-24 14:14:34 +0100123 . tf-a-ci-scripts/eclair/eclair_vars.sh
Paul Sokolovsky63498522023-11-17 22:47:59 +0300124
Chris Kay675db4f2025-06-24 14:14:34 +0100125 detachLicense 600
126 trap "returnLicense || true" EXIT
Paul Sokolovsky63498522023-11-17 22:47:59 +0300127
Chris Kay675db4f2025-06-24 14:14:34 +0100128 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 Sokolovsky63498522023-11-17 22:47:59 +0300133
Chris Kay675db4f2025-06-24 14:14:34 +0100134 echo "========= Building base revision ========="
Paul Sokolovsky63498522023-11-17 22:47:59 +0300135
Chris Kay675db4f2025-06-24 14:14:34 +0100136 (
137 cd $(basename ${GERRIT_PROJECT})
138 git checkout HEAD^
139 git log --oneline -n5
140 )
Paul Sokolovsky63498522023-11-17 22:47:59 +0300141
Chris Kay675db4f2025-06-24 14:14:34 +0100142 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 Sokolovsky63498522023-11-17 22:47:59 +0300147
Chris Kay675db4f2025-06-24 14:14:34 +0100148 eclair_make_delta_report ECLAIR_BASE ECLAIR
149 tf-ci-scripts/eclair/eclair_diff_report.py diff_output > misra_delta.txt
Paul Sokolovsky63498522023-11-17 22:47:59 +0300150
Chris Kay675db4f2025-06-24 14:14:34 +0100151 returnLicense
152 tf-ci-scripts/eclair/analyze_delta_index_html.sh
153 tf-ci-scripts/eclair/post_gerrit_comment.sh
Paul Sokolovsky63498522023-11-17 22:47:59 +0300154 publishers:
Chris Kay675db4f2025-06-24 14:14:34 +0100155 - 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