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