blob: ff15db541286f35940e6c131799b0e19dba9d00c [file] [log] [blame]
Leonardo Sandoval46226da2021-01-15 13:55:56 -06001- job:
Leonardo Sandovalffaee982021-11-11 10:27:57 -06002 name: tf-a-static-checks
Paul Sokolovsky2315d612023-08-05 07:36:23 +03003 node: docker-amd64-tf-a-jammy
Leonardo Sandoval46226da2021-01-15 13:55:56 -06004 project-type: freestyle
5 concurrent: true
6 disabled: false
7 defaults: global
8 description: Run static checks on Git repository
9 properties:
Chris Kay675db4f2025-06-24 14:14:34 +010010 - build-discarder:
11 days-to-keep: 14
Leonardo Sandoval46226da2021-01-15 13:55:56 -060012 parameters:
Chris Kay675db4f2025-06-24 14:14:34 +010013 - 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: Repository to run static checks on.
46 - string:
47 name: GERRIT_BRANCH
48 default: ""
49 - string:
50 name: SHARE_FOLDER
51 default: /srv/shared/${JOB_NAME}/${BUILD_NUMBER}
52 description: Folder containing shared repositories for downstream pipeline jobs
Leonardo Sandoval46226da2021-01-15 13:55:56 -060053 wrappers:
Chris Kay675db4f2025-06-24 14:14:34 +010054 - timestamps
55 - timeout:
56 timeout: 240
57 fail: true
Leonardo Sandoval46226da2021-01-15 13:55:56 -060058 builders:
Chris Kay675db4f2025-06-24 14:14:34 +010059 - shell: !include-raw: scripts/clone.sh
60 - shell: |
61 #!/bin/bash
62 set -e
63 if [[ "${REPO_UNDER_TEST}" == trusted-firmware-a ]]; then
64 cat <<EOF > env.param
65 QA_SERVER_PROJECT=${JOB_NAME}
66 QA_SERVER_VERSION=${BUILD_NUMBER}
67 GERRIT_PROJECT=${TF_GERRIT_PROJECT}
68 GERRIT_BRANCH=${TF_GERRIT_BRANCH}
69 GERRIT_REFSPEC=${TF_GERRIT_REFSPEC}
70 TEST_GROUPS=tf-l2-scan-build
71 EOF
72 fi
73 cd ${WORKSPACE}/${REPO_UNDER_TEST}
74 # Executed project-related static checks: copyright presence, headers in alphabetical order,
75 # line endings, coding style and banned API.
76 IS_CONTINUOUS_INTEGRATION=1 ${WORKSPACE}/tf-a-ci-scripts/script/static-checks/static-checks.sh
77 - trigger-builds:
78 - project: tf-a-ci-gateway
79 block: true
80 property-file: env.param
81 current-parameters: true
82 # Do not trigger tf-a-ci-gateway if env.param file does not exist,
83 # which is the case here for TF-A Tests repository
84 property-file-fail-on-missing: True
Leonardo Sandoval46226da2021-01-15 13:55:56 -060085 publishers:
Chris Kay675db4f2025-06-24 14:14:34 +010086 - archive:
87 artifacts: ${REPO_UNDER_TEST}/static-checks.log
88 - groovy-postbuild:
89 script: !include-raw:
90 - tf-a-static-checks/postbuild.groovy