Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 1 | - scm: |
| 2 | name: tf-a-ci-scripts |
| 3 | scm: |
| 4 | - git: |
| 5 | url: https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git |
| 6 | refspec: +refs/heads/master:refs/remotes/origin/master |
| 7 | name: origin |
| 8 | branches: |
| 9 | - refs/heads/master |
| 10 | basedir: tf-a-ci-scripts |
| 11 | skip-tag: true |
| 12 | shallow-clone: true |
| 13 | wipe-workspace: false |
| 14 | - scm: |
| 15 | name: trusted-firmware-a |
| 16 | scm: |
| 17 | - git: |
| 18 | url: https://review.trustedfirmware.org/${TF_GERRIT_PROJECT} |
| 19 | refspec: ${TF_GERRIT_REFSPEC} |
| 20 | name: origin |
| 21 | branches: |
| 22 | - ${TF_GERRIT_BRANCH} |
| 23 | basedir: trusted-firmware-a |
| 24 | skip-tag: true |
| 25 | shallow-clone: false |
| 26 | wipe-workspace: false |
Leonardo Sandoval | ecbc6f4 | 2021-03-19 10:36:24 -0600 | [diff] [blame^] | 27 | - scm: |
| 28 | name: tf-a-tests |
| 29 | scm: |
| 30 | - git: |
| 31 | url: https://review.trustedfirmware.org/${TFTF_GERRIT_PROJECT} |
| 32 | refspec: ${TFTF_GERRIT_REFSPEC} |
| 33 | name: origin |
| 34 | branches: |
| 35 | - ${TFTF_GERRIT_BRANCH} |
| 36 | basedir: tf-a-tests |
| 37 | skip-tag: true |
| 38 | shallow-clone: false |
| 39 | wipe-workspace: false |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 40 | - job: |
| 41 | name: tf-static-checks |
| 42 | node: docker-amd64-tf-a-bionic |
| 43 | project-type: freestyle |
| 44 | concurrent: true |
| 45 | disabled: false |
| 46 | defaults: global |
| 47 | description: Run static checks on Git repository |
| 48 | properties: |
| 49 | - build-discarder: |
Leonardo Sandoval | a4feb55 | 2021-03-02 12:10:21 -0600 | [diff] [blame] | 50 | days-to-keep: 14 |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 51 | - authorization: |
Leonardo Sandoval | ebca882 | 2021-01-25 18:20:04 -0600 | [diff] [blame] | 52 | !include: authorization.yaml.inc |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 53 | parameters: |
| 54 | - string: |
| 55 | name: TF_GERRIT_PROJECT |
| 56 | default: 'TF-A/trusted-firmware-a' |
| 57 | - string: |
| 58 | name: TF_GERRIT_BRANCH |
Leonardo Sandoval | 3da340d | 2021-02-09 14:53:30 -0600 | [diff] [blame] | 59 | default: 'refs/heads/integration' |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 60 | - string: |
| 61 | name: TF_GERRIT_REFSPEC |
Leonardo Sandoval | 3da340d | 2021-02-09 14:53:30 -0600 | [diff] [blame] | 62 | default: '+refs/heads/integration:refs/remotes/origin/integration' |
Leonardo Sandoval | ecbc6f4 | 2021-03-19 10:36:24 -0600 | [diff] [blame^] | 63 | - string: |
| 64 | name: TFTF_GERRIT_PROJECT |
| 65 | default: 'TF-A/tf-a-tests' |
| 66 | - string: |
| 67 | name: TFTF_GERRIT_BRANCH |
| 68 | default: 'refs/heads/master' |
| 69 | - string: |
| 70 | name: TFTF_GERRIT_REFSPEC |
| 71 | default: '+refs/heads/master:refs/remotes/origin/master' |
| 72 | - choice: |
| 73 | name: REPO_UNDER_TEST |
| 74 | choices: |
| 75 | - trusted-firmware-a |
| 76 | - tf-a-tests |
| 77 | default: trusted-firmware-a |
| 78 | description: |- |
| 79 | Repository to run static checks on. |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 80 | scm: |
| 81 | - tf-a-ci-scripts |
| 82 | - trusted-firmware-a |
Leonardo Sandoval | ecbc6f4 | 2021-03-19 10:36:24 -0600 | [diff] [blame^] | 83 | - tf-a-tests |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 84 | wrappers: |
| 85 | - timestamps |
| 86 | - timeout: |
| 87 | timeout: 180 |
| 88 | fail: true |
| 89 | builders: |
| 90 | - shell: | |
| 91 | #!/bin/bash |
| 92 | set -e |
Leonardo Sandoval | ecbc6f4 | 2021-03-19 10:36:24 -0600 | [diff] [blame^] | 93 | if [[ "${REPO_UNDER_TEST}" == trusted-firmware-a ]]; then |
| 94 | cat <<EOF > env.param |
| 95 | QA_SERVER_PROJECT=${JOB_NAME} |
| 96 | QA_SERVER_VERSION=${BUILD_NUMBER} |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 97 | GERRIT_PROJECT=${TF_GERRIT_PROJECT} |
| 98 | GERRIT_BRANCH=${TF_GERRIT_BRANCH} |
| 99 | GERRIT_REFSPEC=${TF_GERRIT_REFSPEC} |
Leonardo Sandoval | ecbc6f4 | 2021-03-19 10:36:24 -0600 | [diff] [blame^] | 100 | TEST_GROUPS=tf-l2-scan-build |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 101 | EOF |
Leonardo Sandoval | ecbc6f4 | 2021-03-19 10:36:24 -0600 | [diff] [blame^] | 102 | fi |
| 103 | cd ${WORKSPACE}/${REPO_UNDER_TEST} |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 104 | # Executed project-related static checks: copyright presence, headers in alphabetical order, |
| 105 | # line endings, coding style and banned API. |
| 106 | IS_CONTINUOUS_INTEGRATION=1 ${WORKSPACE}/tf-a-ci-scripts/script/static-checks/static-checks.sh |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 107 | - trigger-builds: |
| 108 | - project: tf-ci-gateway |
Leonardo Sandoval | 9f11c92 | 2021-02-16 09:13:53 -0600 | [diff] [blame] | 109 | block: true |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 110 | property-file: env.param |
Leonardo Sandoval | ecbc6f4 | 2021-03-19 10:36:24 -0600 | [diff] [blame^] | 111 | # Do not trigger tf-ci-gateway if env.param file does not exist, |
| 112 | # which is the case here for TF-A Tests repository |
| 113 | property-file-fail-on-missing: True |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 114 | publishers: |
| 115 | - archive: |
Leonardo Sandoval | ecbc6f4 | 2021-03-19 10:36:24 -0600 | [diff] [blame^] | 116 | artifacts: '${REPO_UNDER_TEST}/static-checks.log' |
Leonardo Sandoval | 46226da | 2021-01-15 13:55:56 -0600 | [diff] [blame] | 117 | - groovy-postbuild: |
| 118 | script: |
| 119 | !include-raw: |
| 120 | - tf-static-checks/postbuild.groovy |