diff options
author | Antonio Terceiro <antonio.terceiro@linaro.org> | 2018-03-28 11:54:17 -0300 |
---|---|---|
committer | Antonio Terceiro <antonio.terceiro@linaro.org> | 2018-04-02 15:04:52 -0300 |
commit | 2d662c64973258d282faa49a2320bc18d57255b9 (patch) | |
tree | de060c8a186c9207ba87f37e33865619645f2ec8 /staging-qa-reports | |
parent | 83125d4fcc645d7e4512f7a3523a3904a865f041 (diff) |
staging-qa-reports.yaml: add new job
This job upgrades staging-qa-reports.linaro.org against squad master,
also using the master branch of the ansible configuration for
qa-reports.linaro.org
Change-Id: I34a9fdd0301db0156a363a6de7195de8f2b8b9c8
Signed-off-by: Antonio Terceiro <antonio.terceiro@linaro.org>
Diffstat (limited to 'staging-qa-reports')
-rwxr-xr-x | staging-qa-reports/builders.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/staging-qa-reports/builders.sh b/staging-qa-reports/builders.sh new file mode 100755 index 00000000..3ef2d399 --- /dev/null +++ b/staging-qa-reports/builders.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +set -e + +trap cleanup_exit INT TERM EXIT + +cleanup_exit() +{ + rm -f ${HOME}/.ansible-vault-passwd +} + +banner() { + echo + echo "$@" | sed -e 's/./-/g' + echo "$@" + echo "$@" | sed -e 's/./-/g' + echo +} + +banner "Install required Debian packages" +echo "deb http://deb.debian.org/debian stretch-backports main" > stretch-backports.list +sudo mv stretch-backports.list /etc/apt/sources.list.d/ + +sudo DEBIAN_FRONTEND=noninteractive apt-get -q=2 update +sudo DEBIAN_FRONTEND=noninteractive apt-get -q=2 install -y \ + git moreutils unzip wget python3-setuptools python3-wheel +sudo DEBIAN_FRONTEND=noninteractive apt-get -q=2 install -y \ + -t stretch-backports ansible + +banner "Build squad package" +rm -rf build dist +./scripts/git-build +pkg=$(basename dist/*.whl) + +banner "Deploy" +cp -a dist/${pkg} qa-reports.linaro.org/ansible +cd qa-reports.linaro.org/ansible/ +echo "${ANSIBLE_VAULT_PASSWORD}" > ${HOME}/.ansible-vault-passwd +./deploy staging --vault-password-file ~/.ansible-vault-passwd --extra-vars squad=${pkg} site.yml |