tf-static-checks: introduce job
The proposed job (tf-static-checks) effectively superseed
'tf-a-static-checks.yaml', where besides the different names, the new
jobs is formatted similar as the recent migrated jobs and also
introduce a summary page as seen in [1].
This patch also fixes tf-main's static check job call, which now calls
the tf-static-checks job. Also, the static check code at
tf-a-builder is removed, leaving the latter job with the only purpose
of building (and nothing more).
[1] https://ci.staging.trustedfirmware.org/job/lsandov1-tf-static-checks/19/
Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: Ic605ec8fe84445b080aa0dd38d4f85d289411656
diff --git a/tf-static-checks.yaml b/tf-static-checks.yaml
new file mode 100644
index 0000000..061c106
--- /dev/null
+++ b/tf-static-checks.yaml
@@ -0,0 +1,101 @@
+- scm:
+ name: tf-a-ci-scripts
+ scm:
+ - git:
+ url: https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git
+ refspec: +refs/heads/master:refs/remotes/origin/master
+ name: origin
+ branches:
+ - refs/heads/master
+ basedir: tf-a-ci-scripts
+ skip-tag: true
+ shallow-clone: true
+ wipe-workspace: false
+- scm:
+ name: trusted-firmware-a
+ scm:
+ - git:
+ url: https://review.trustedfirmware.org/${TF_GERRIT_PROJECT}
+ refspec: ${TF_GERRIT_REFSPEC}
+ name: origin
+ branches:
+ - ${TF_GERRIT_BRANCH}
+ basedir: trusted-firmware-a
+ skip-tag: true
+ shallow-clone: false
+ wipe-workspace: false
+
+- job:
+ name: tf-static-checks
+ node: docker-amd64-tf-a-bionic
+ project-type: freestyle
+ concurrent: true
+ disabled: false
+ defaults: global
+ description: Run static checks on Git repository
+ properties:
+ - build-discarder:
+ days-to-keep: 7
+ - authorization:
+ anonymous:
+ - job-discover
+ - job-read
+ - job-extended-read
+ - job-workspace
+ lsandov1:
+ - job-read
+ - job-extended-read
+ - job-build
+ - job-cancel
+ - run-update
+ parameters:
+ - string:
+ name: TF_GERRIT_PROJECT
+ default: 'TF-A/trusted-firmware-a'
+ - string:
+ name: TF_GERRIT_BRANCH
+ default: 'refs/heads/master'
+ - string:
+ name: TF_GERRIT_REFSPEC
+ default: '+refs/heads/master:refs/remotes/origin/master'
+ scm:
+ - tf-a-ci-scripts
+ - trusted-firmware-a
+ wrappers:
+ - timestamps
+ - timeout:
+ timeout: 180
+ fail: true
+ builders:
+ - shell: |
+ #!/bin/bash
+ set -e
+
+ cat > env.param << EOF
+ GERRIT_PROJECT=${TF_GERRIT_PROJECT}
+ GERRIT_BRANCH=${TF_GERRIT_BRANCH}
+ GERRIT_REFSPEC=${TF_GERRIT_REFSPEC}
+ QA_SERVER_PROJECT=${JOB_NAME}
+ QA_SERVER_VERSION=${BUILD_NUMBER}
+ EOF
+
+ cd ${WORKSPACE}/trusted-firmware-a
+
+ # Executed project-related static checks: copyright presence, headers in alphabetical order,
+ # line endings, coding style and banned API.
+ IS_CONTINUOUS_INTEGRATION=1 ${WORKSPACE}/tf-a-ci-scripts/script/static-checks/static-checks.sh
+
+ - trigger-builds:
+ - project: tf-ci-gateway
+ block: false
+ # Execute Clang static analyzer (scan-build)
+ predefined-parameters: TEST_GROUPS=tf-l2-scan-build
+ property-file: env.param
+
+ publishers:
+ - archive:
+ artifacts: 'trusted-firmware-a/static-checks.log'
+ - groovy-postbuild:
+ script:
+ !include-raw:
+ - tf-static-checks/postbuild.groovy