ansible playbook to set up a laminar container Ci build. moved to: https://git.sindominio.net/sindominio/ansible_laminar
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible_laminar/check_updates

26 lines
578 B

#!/bin/bash -x
image=$1
docker run --entrypoint /bin/bash -u root {{ registry_domain }}/$image -c "apt-get update; apt-get upgrade --assume-no"
if [ $? -eq 1 ]
then
echo "update ${image}"
if [ "$image" == "debian" ]
then
laminarc queue base_image
else
build_image $image
fi
exit 0
fi
echo "check for updates of child images of ${image}"
base="{{ registry_domain }}/$1"
for i in `curl -s -X GET {{ registry }}/v2/_catalog | jq -r '.repositories[]'`
do
if [ ! -z "`grep "FROM ${base}" {{ laminar_home }}/repos/${i}/Dockerfile`" ]
then
check_updates $i
fi
done