diff options
author | Riku Voipio <riku.voipio@linaro.org> | 2019-01-17 15:07:41 +0200 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2019-01-17 13:58:11 +0000 |
commit | 17f66ed05dd7ce37500005cb92ae558dce6b0afb (patch) | |
tree | e3da0d20ebb1e4649a7238de5760e776db4a81b6 /ci-dockerfiles-deployment | |
parent | d3d42097936add8dd93a24cad52f3c0f2bdfdc96 (diff) |
ci-dockerfiles-monthly: switch to parameter factory
Switch to parameter factory and use git to find updated
images - the filestamp approach doesn't work in freshly
cloned repos
Change-Id: I442fdfea3b6e31c8d2c4edd939ccaafc346dd26f
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'ci-dockerfiles-deployment')
-rwxr-xr-x | ci-dockerfiles-deployment/update-images.sh | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/ci-dockerfiles-deployment/update-images.sh b/ci-dockerfiles-deployment/update-images.sh index 899f3403..55692e6e 100755 --- a/ci-dockerfiles-deployment/update-images.sh +++ b/ci-dockerfiles-deployment/update-images.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -git clone --depth 1 https://git.linaro.org/ci/dockerfiles.git +git clone https://git.linaro.org/ci/dockerfiles.git cd dockerfiles/ images_to_update="" @@ -13,14 +13,13 @@ for dir in ./*/; do echo $shortdir|grep -q tcwg && continue # not an image dir [ -x $shortdir/build.sh ]||continue - pushd $shortdir >/dev/null - if find -mtime -30|grep -q "."; then + changed=$(git log -1 --oneline --since "1 month" ${shortdir}|wc -l) + if [ $changed -eq 1 ]; then echo "new: $shortdir" else echo "nothing new: $shortdir" images_to_update="$images_to_update $shortdir" fi - popd > /dev/null done echo $images_to_update @@ -28,8 +27,13 @@ echo $images_to_update # trigger builds for every non-updated image over the http api for image in $images_to_update do - nodelabel="build-$(echo $image | cut -f2 -d '-')" - echo curl -X POST "https://${BOTUSER}:${APITOKEN}@ci.linaro.org/job/ci-dockerfile-build/buildWithParameters?nodelabel=${nodelabel}&image=${image}" + arch=$(echo ${image} | cut -f2 -d '-') + if [ "$arch" = "aarch64" ]; then + arch=arm64 + fi + cat > ../docker_${image}_build.txt << EOF +nodelabel=build-${arch} +image=${image} +EOF done - |