- 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: triggers | |
display-name: 'CI YADP config builder' | |
triggers: | |
- gerrit: | |
server-name: 'review.linaro.org' | |
trigger-on: | |
- change-merged-event | |
projects: | |
- project-compare-type: 'PLAIN' | |
project-pattern: 'infrastructure/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.linaro.org/${GERRIT_PROJECT} | |
cd * | |
git fetch https://review.linaro.org/${GERRIT_PROJECT} ${GERRIT_REFSPEC} | |
git checkout -q FETCH_HEAD | |
python3 yadp_builder.py --server https://ci.linaro.org | |
publishers: | |
- email: | |
recipients: 'linaro-infrastructure-errors@lists.linaro.org' |