TF: Add ci-yadp-builder job
This add the YADP builder job into ci.tf.o so the Jenkins config is
built through SCM
Signed-off-by: Benjamin Copeland <ben.copeland@linaro.org>
Change-Id: I54ef2360a1ed1556851b9324535bc7e067764a0d
diff --git a/ci-yadp-builder-sanity.yaml b/ci-yadp-builder-sanity.yaml
new file mode 100644
index 0000000..068a235
--- /dev/null
+++ b/ci-yadp-builder-sanity.yaml
@@ -0,0 +1,64 @@
+- job:
+ name: ci-yadp-builder-sanity
+ project-type: freestyle
+ defaults: global
+ properties:
+ - authorization:
+ anonymous:
+ - job-read
+ - job-extended-read
+ - build-discarder:
+ days-to-keep: 30
+ num-to-keep: 30
+ disabled: false
+ node: master
+ display-name: 'CI YADP config builder sanity check'
+ triggers:
+ - gerrit:
+ server-name: 'review.trustedfirmware.org'
+ trigger-on:
+ - patchset-created-event
+ projects:
+ - project-compare-type: 'PLAIN'
+ project-pattern: 'ci/ci-yadp-builder'
+ branches:
+ - branch-pattern: 'master'
+ silent-start: true
+ wrappers:
+ - timestamps
+ - credentials-binding:
+ - text:
+ credential-id: JJB_USER
+ variable: JJB_USER
+ - text:
+ credential-id: JJB_PASSWORD
+ variable: JJB_PASSWORD
+ builders:
+ - shell: |
+ #!/bin/bash -e
+ echo "#${BUILD_NUMBER}-${GERRIT_PATCHSET_REVISION:0:8}" > ${WORKSPACE}/version.txt
+ - build-name-setter:
+ name: 'version.txt'
+ file: true
+ - shell: |
+ #!/bin/bash
+
+ set -e
+
+ echo ""
+ echo "########################################################################"
+ echo " Gerrit Environment"
+ env |grep '^GERRIT'
+ echo "########################################################################"
+
+ rm -rf ${WORKSPACE}/*
+
+ git clone -b ${GERRIT_BRANCH} --depth 2 https://review.trustedfirmware.org/${GERRIT_PROJECT}
+ cd *
+ git fetch https://review.trustedfirmware.org/${GERRIT_PROJECT} ${GERRIT_REFSPEC}
+ git checkout -q FETCH_HEAD
+
+ python yadp_builder_v2.py --dryrun
+ publishers:
+ - email:
+ recipients: 'linaro-infrastructure-errors@lists.linaro.org'
diff --git a/ci-yadp-builder.yaml b/ci-yadp-builder.yaml
new file mode 100644
index 0000000..394b041
--- /dev/null
+++ b/ci-yadp-builder.yaml
@@ -0,0 +1,63 @@
+- job:
+ name: ci-yadp-builder
+ project-type: freestyle
+ defaults: global
+ properties:
+ - authorization:
+ anonymous:
+ - job-read
+ - job-extended-read
+ - build-discarder:
+ days-to-keep: 30
+ num-to-keep: 30
+ node: master
+ display-name: 'CI YADP config builder'
+ triggers:
+ - gerrit:
+ server-name: 'review.trustedfirmware.org'
+ trigger-on:
+ - change-merged-event
+ projects:
+ - project-compare-type: 'PLAIN'
+ project-pattern: 'ci/ci-yadp-builder'
+ branches:
+ - branch-pattern: 'master'
+ silent-start: true
+ wrappers:
+ - timestamps
+ - credentials-binding:
+ - text:
+ credential-id: JJB_USER
+ variable: JJB_USER
+ - text:
+ credential-id: JJB_PASSWORD
+ variable: JJB_PASSWORD
+ builders:
+ - shell: |
+ #!/bin/bash -e
+ echo "#${BUILD_NUMBER}-${GERRIT_PATCHSET_REVISION:0:8}" > ${WORKSPACE}/version.txt
+ - build-name-setter:
+ name: 'version.txt'
+ file: true
+ - shell: |
+ #!/bin/bash
+
+ set -e
+
+ echo ""
+ echo "########################################################################"
+ echo " Gerrit Environment"
+ env |grep '^GERRIT'
+ echo "########################################################################"
+
+ rm -rf ${WORKSPACE}/*
+
+ git clone -b ${GERRIT_BRANCH} --depth 2 https://review.trustedfirmware.org/${GERRIT_PROJECT}
+ cd *
+ git fetch https://review.trustedfirmware.org/${GERRIT_PROJECT} ${GERRIT_REFSPEC}
+ git checkout -q FETCH_HEAD
+
+ python yadp_builder_v2.py
+ publishers:
+ - email:
+ recipients: 'linaro-infrastructure-errors@lists.linaro.org'