Browse Source

Do a nightly check for updates on all images

master
meskio 3 years ago
parent
commit
e6c4d76eb2
Signed by: meskio
GPG Key ID: 52B8F5AC97A2DA86
  1. 15
      check_updates.run
  2. 9
      playbook.yml

15
check_updates.run

@ -0,0 +1,15 @@
#!/bin/bash -x
for image in `curl -s -X GET {{ registry_domain }}/v2/_catalog | jq -r '.repositories[]'`
do
if [ "$image" == "debian" ]
then
continue
fi
docker run --entrypoint /bin/bash -u root {{ registry_domain }}/$image -c "apt-get update; apt-get upgrade --assume-no"
if [ $? -ne 0 ]
then
build_image $image
fi
done

9
playbook.yml

@ -139,6 +139,7 @@
with_items:
- build_image.run
- base_image.run
- check_updates.run
- name: enable laminar
service: name=laminar state=started enabled=yes
@ -146,9 +147,15 @@
- name: set nightly base image rebuild
cron:
name: "rebuild base image"
hour: "3"
hour: "2"
job: "/usr/bin/laminarc queue base_image"
- name: set nightly check for image updates
cron:
name: "check image updates"
hour: "5"
job: "/usr/bin/laminarc queue check_updates"
- name: copy build_image script
copy:
src: build_image

Loading…
Cancel
Save