blob: 12e73dca4485606a10fbe724e2799f9e495f9f1f [file] [log] [blame]
Jayanth Dodderi Chidanand45e087d2024-10-02 11:53:59 +01001- job:
2 name: jayanthdc-arm-tf-a-static-checks
3 node: docker-amd64-tf-a-next-jammy
4 project-type: freestyle
5 concurrent: true
6 disabled: false
7 defaults: global
8 description: Run static checks on Git repository
9 properties:
10 - build-discarder:
11 days-to-keep: 14
12 - authorization:
13 !include: jayanthdc-arm-authorization.yaml.inc
14 parameters:
15 - string:
16 name: TF_GERRIT_PROJECT
17 default: 'TF-A/trusted-firmware-a'
18 - string:
19 name: TF_GERRIT_BRANCH
20 default: 'refs/heads/integration'
21 - string:
22 name: TF_GERRIT_REFSPEC
23 default: '+refs/heads/integration:refs/remotes/origin/integration'
24 - string:
25 name: TFTF_GERRIT_PROJECT
26 default: 'TF-A/tf-a-tests'
27 - string:
28 name: TFTF_GERRIT_BRANCH
29 default: 'refs/heads/master'
30 - string:
31 name: TFTF_GERRIT_REFSPEC
32 default: '+refs/heads/master:refs/remotes/origin/master'
33 - string:
34 name: CI_REFSPEC
35 default: '+refs/heads/master:refs/remotes/origin/master'
Jayanth Dodderi Chidanand3ae700e2025-04-04 18:16:18 +010036 - string:
37 name: JOBS_REFSPEC
38 default: 'refs/heads/master'
39 description: |
40 tf-a-job-configs refspec to use. The master branch is used by default.
Jayanth Dodderi Chidanand45e087d2024-10-02 11:53:59 +010041 - choice:
42 name: REPO_UNDER_TEST
43 choices:
44 - trusted-firmware-a
45 - tf-a-tests
46 default: trusted-firmware-a
47 description: |-
48 Repository to run static checks on.
49 - string:
50 name: GERRIT_BRANCH
51 default: ''
52 - string:
53 name: SHARE_FOLDER
Chris Kay4bbc9692025-06-13 15:24:41 +010054 default: '/srv/shared/staging/${JOB_NAME}/${BUILD_NUMBER}'
Jayanth Dodderi Chidanand45e087d2024-10-02 11:53:59 +010055 description: 'Folder containing shared repositories for downstream pipeline jobs'
56 wrappers:
57 - timestamps
58 - timeout:
59 timeout: 240
60 fail: true
61 builders:
62 - shell:
63 !include-raw: scripts/clone.sh
64 - shell: |
65 #!/bin/bash
66 set -e
67 if [[ "${REPO_UNDER_TEST}" == trusted-firmware-a ]]; then
68 cat <<EOF > env.param
69 QA_SERVER_PROJECT=${JOB_NAME}
70 QA_SERVER_VERSION=${BUILD_NUMBER}
71 GERRIT_PROJECT=${TF_GERRIT_PROJECT}
72 GERRIT_BRANCH=${TF_GERRIT_BRANCH}
73 GERRIT_REFSPEC=${TF_GERRIT_REFSPEC}
74 TEST_GROUPS=tf-l2-scan-build
75 EOF
76 fi
77 cd ${WORKSPACE}/${REPO_UNDER_TEST}
78 # Executed project-related static checks: copyright presence, headers in alphabetical order,
79 # line endings, coding style and banned API.
80 IS_CONTINUOUS_INTEGRATION=1 ${WORKSPACE}/tf-a-ci-scripts/script/static-checks/static-checks.sh
81 - trigger-builds:
82 - project: jayanthdc-arm-tf-a-ci-gateway
83 block: true
84 property-file: env.param
85 current-parameters: true
86 # Do not trigger tf-a-ci-gateway if env.param file does not exist,
87 # which is the case here for TF-A Tests repository
88 property-file-fail-on-missing: True
89 publishers:
90 - archive:
91 artifacts: '${REPO_UNDER_TEST}/static-checks.log'
92 - groovy-postbuild:
93 script:
94 !include-raw:
95 - tf-a-static-checks/postbuild.groovy