Commit 64c04f92 authored by Remi Perenon's avatar Remi Perenon

Debugging deploy state and improving docker cleaning

parent 187309ba
......@@ -21,7 +21,7 @@ deploy:ubuntu_trusty:
script:
- docker build --force-rm -t deploy_mdanse_trusty -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-trusty/Dockerfile_deploy .
- chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh trusty
dependencies:
- ci:ubuntu_trusty
allow_failure: false
......@@ -58,7 +58,7 @@ deploy:ubuntu_xenial:
script:
- docker build --force-rm -t deploy_mdanse_xenial -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-xenial/Dockerfile_deploy .
- chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh xenial
dependencies:
- ci:ubuntu_xenial
allow_failure: false
......@@ -95,7 +95,7 @@ deploy:ubuntu_bionic:
script:
- docker build --force-rm -t deploy_mdanse_bionic -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-bionic/Dockerfile_deploy .
- chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh bionic
dependencies:
- ci:ubuntu_bionic
allow_failure: false
......
......@@ -16,3 +16,12 @@ then
docker rmi -f ${images}
fi
# Return the docker images that are in dangling state
images=`docker images -q -f "dangling=true"`
# If some dangling images have been found, remove them
if [ -n "$images" ]
then
docker rmi -f ${images}
fi
docker run --rm -iv${PWD}:/artifacts/ deploy_mdanse_xenial << COMMANDS
docker run --rm -iv${PWD}:/artifacts/ deploy_mdanse_$1 << COMMANDS
chmod 755 /mdanse/BuildServer/*.deb
cp -a /mdanse/BuildServer/*.deb /artifacts/.
COMMANDS
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment