aboutsummaryrefslogtreecommitdiff
path: root/ci-dockerfiles-manifests
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@linaro.org>2017-04-28 16:29:56 +0300
committerFathi Boudra <fathi.boudra@linaro.org>2017-05-02 16:53:44 +0000
commit0284868aed8e35514922542c7441cd7605e03a3e (patch)
tree8a1bbb43c234191cca98fcee52aeaf48dfafd201 /ci-dockerfiles-manifests
parent3fe7910c1773cf1d1808ea13c2cae11ab283ed72 (diff)
ci-docker-manifests: automatically deploy multiarch manifests
See https://git.linaro.org/ci/docker-manifests.git for sample manifests. This job simply updates all manifests to latest published ones instead of trying to figure out what changed. Change-Id: Ia0faa5afd544ea55985f27c54459c0cbb1f49afc Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'ci-dockerfiles-manifests')
-rw-r--r--ci-dockerfiles-manifests/builders.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/ci-dockerfiles-manifests/builders.sh b/ci-dockerfiles-manifests/builders.sh
new file mode 100644
index 0000000000..f32f9367d3
--- /dev/null
+++ b/ci-dockerfiles-manifests/builders.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+set -ex
+
+trap cleanup_exit INT TERM EXIT
+
+cleanup_exit()
+{
+ rm -rf ${HOME}/.docker
+}
+
+if ! sudo apt-get -q=2 update; then
+ echo "INFO: apt update error - try again in a moment"
+ sleep 15
+ sudo apt-get -q=2 update || true
+fi
+if ! sudo DEBIAN_FRONTEND=noninteractive apt-get -q=2 install -y manifest-tool; then
+ echo "INFO: apt install error - try again in a moment"
+ sleep 15
+ sudo DEBIAN_FRONTEND=noninteractive apt-get -q=2 install -y manifest-tool
+fi
+
+mkdir -p ${HOME}/.docker
+sed -e "s|\${DOCKER_AUTH}|${DOCKER_AUTH}|" < ${WORKSPACE}/config.json > ${HOME}/.docker/config.json
+chmod 0600 ${HOME}/.docker/config.json
+
+rm -rf ${WORKSPACE}/*
+
+git clone --depth 1 https://git.linaro.org/ci/docker-manifests.git
+cd docker-manifests
+for manifest in *.yaml; do
+ manifest-tool push from-spec ${manifest}
+done