Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 1 | - job: |
Leonardo Sandoval | ffaee98 | 2021-11-11 10:27:57 -0600 | [diff] [blame] | 2 | name: tf-a-static-checks |
Paul Sokolovsky | 2315d61 | 2023-08-05 07:36:23 +0300 | [diff] [blame] | 3 | node: docker-amd64-tf-a-jammy |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 4 | project-type: freestyle |
| 5 | concurrent: true |
| 6 | disabled: false |
| 7 | defaults: global |
| 8 | description: Run static checks on Git repository |
| 9 | properties: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 10 | - build-discarder: |
| 11 | days-to-keep: 14 |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 12 | parameters: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 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: 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 Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 53 | wrappers: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 54 | - timestamps |
| 55 | - timeout: |
| 56 | timeout: 240 |
| 57 | fail: true |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 58 | builders: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 59 | - 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 Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 85 | publishers: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 86 | - archive: |
| 87 | artifacts: ${REPO_UNDER_TEST}/static-checks.log |
| 88 | - groovy-postbuild: |
| 89 | script: !include-raw: |
| 90 | - tf-a-static-checks/postbuild.groovy |