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/base_image.run

28 lines
745 B

#!/bin/bash -ex
ROOTPATH="$WORKSPACE/rootfs"
PATH=$PATH:/usr/sbin
image="debian"
if [ -d ${ROOTPATH} ]
then
sudo debuerreotype-apt-get ${ROOTPATH} update
sudo debuerreotype-apt-get ${ROOTPATH} upgrade --assume-no
if [ $? -eq 0 ]
then
echo "No updates needed"
exit 0
fi
sudo rm -rf ${ROOTPATH}
fi
sudo debuerreotype-init ${ROOTPATH} stable `date +%FT%T`
sudo debuerreotype-minimizing-config ${ROOTPATH}
sudo debuerreotype-gen-sources-list ${ROOTPATH} stable 'http://deb.debian.org/debian' 'http://security.debian.org/debian-security'
sudo debuerreotype-tar ${ROOTPATH} - | docker import -c 'CMD ["bash"]' - ${image}
docker tag ${image} {{ registry }}/${image}
docker push {{ registry }}/${image}
# TODO: rebuild dependent images