Commit c4d4c6ad authored by Remi Perenon's avatar Remi Perenon

Updating Docker and uploading artefacts

parent df1ec6ed
Pipeline #7020 passed with stages
in 8 minutes and 2 seconds
stages:
- docker_pre_clean
- make
- docker_post_clean
docker_pre_clean:
stage: docker_pre_clean
script:
- ${CI_PROJECT_DIR}/BuildServer/Docker/clean.sh
allow_failure: true
tags:
- docker
- sci
- ubuntu
docker_post_clean:
stage: docker_post_clean
script:
- ${CI_PROJECT_DIR}/BuildServer/Docker/clean.sh
allow_failure: true
when: always
tags:
- docker
- sci
- ubuntu
#===============
make:linux_gfortran:
stage: make
script:
- docker build --force-rm -t ci_crysfml_xenial_gfortran -f ${CI_PROJECT_DIR}/BuildServer/Docker/Dockerfile_setup_xenial_gfortran .
- docker build --force-rm --no-cache -t ci_crysfml_xenial_build_gfortran_${CI_COMMIT_SHORT_SHA} -f ${CI_PROJECT_DIR}/BuildServer/Docker/Dockerfile_build_xenial_gfortran .
- docker run ci_crysfml_xenial_build_gfortran_${CI_COMMIT_SHORT_SHA}
- docker build --force-rm --no-cache -t ci_crysfml_xenial_gfortran_build -f ${CI_PROJECT_DIR}/BuildServer/Docker/Dockerfile_build_xenial_gfortran --build-arg CI_COMMIT_SHORT_SHA=${CI_COMMIT_SHORT_SHA} --build-arg CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME} .
- docker run -iv${PWD}:/artifacts/ ci_crysfml_xenial_gfortran_build
artifacts:
paths:
- ${CI_PROJECT_DIR}/build_gfortran
expire_in: 1 day
tags:
- docker
- sci
- ubuntu
......@@ -17,9 +44,14 @@ make:linux_ifort:
stage: make
script:
- docker build --force-rm -t ci_crysfml_xenial_ifort -f ${CI_PROJECT_DIR}/BuildServer/Docker/Dockerfile_setup_xenial_ifort .
- docker build --force-rm --no-cache -t ci_crysfml_xenial_build_ifort_${CI_COMMIT_SHORT_SHA} -f ${CI_PROJECT_DIR}/BuildServer/Docker/Dockerfile_build_xenial_ifort .
- docker run -v /users/ci/intel:/opt/intel ci_crysfml_xenial_build_ifort_${CI_COMMIT_SHORT_SHA}
- docker build --force-rm --no-cache -t ci_crysfml_xenial_ifort_build -f ${CI_PROJECT_DIR}/BuildServer/Docker/Dockerfile_build_xenial_ifort .
- docker run -iv${PWD}:/artifacts/ -v/users/ci/intel:/opt/intel ci_crysfml_xenial_ifort_build
artifacts:
paths:
- ${CI_PROJECT_DIR}/build_ifort
expire_in: 1 day
tags:
- docker
- sci
- ubuntu
......@@ -29,12 +61,20 @@ make:macos_gfortran:
stage: make
script:
- BuildServer/Unix/build.sh gfortran
artifacts:
paths:
- ${CI_PROJECT_DIR}/build_gfortran
expire_in: 1 day
tags:
- sci
- osx-10.13
make:macos_ifort:
stage: make
artifacts:
paths:
- ${CI_PROJECT_DIR}/build_ifort
expire_in: 1 day
script:
- BuildServer/Unix/build.sh ifort
tags:
......@@ -52,6 +92,10 @@ make:windows_gfortran:
- set CRYSFML_NEXUS_DIR=C:\\Projects\\fullprof\\NeXuS
- set CRYSFML_BLOSC_DIR=C:\\Projects\\fullprof\\blosc
- call "%BuildServer\\Windows\\build.bat" gfortran
artifacts:
paths:
- "%CI_PROJECT_DIR%\\build_gfortran"
expire_in: 1 day
tags:
- sci
- windows-10
......@@ -66,6 +110,10 @@ make:windows_ifort:
- set CRYSFML_NEXUS_DIR=C:\\Projects\\fullprof\\NeXuS
- set CRYSFML_BLOSC_DIR=C:\\Projects\\fullprof\\blosc
- call "%BuildServer\\Windows\\build.bat" ifort
artifacts:
paths:
- "%CI_PROJECT_DIR%\\build_ifort"
expire_in: 1 day
tags:
- sci
- windows-10
\ No newline at end of file
FROM ci_crysfml_xenial_gfortran
SHELL ["/bin/bash", "-c"]
ARG CI_COMMIT_SHORT_SHA
ARG CI_COMMIT_REF_NAME
ENV CI_COMMIT_SHORT_SHA=${CI_COMMIT_SHORT_SHA}
ENV CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME}
COPY ./ /app/
WORKDIR /app
CMD BuildServer/Unix/build.sh gfortran
\ No newline at end of file
CMD BuildServer/Unix/build.sh gfortran; cp -a build_gfortran /artifacts/
\ No newline at end of file
......@@ -3,4 +3,4 @@ FROM ci_crysfml_xenial_ifort
COPY ./ /app/
WORKDIR /app
CMD BuildServer/Unix/build.sh ifort
\ No newline at end of file
CMD BuildServer/Unix/build.sh ifort; cp -a build_ifort /artifacts/
\ No newline at end of file
# Return the docker containers that are exited
exited_containers=`docker ps -q -f "status=exited"`
# If some have been found, remove them
if [ -n "$exited_containers" ]
then
docker rm ${exited_containers}
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
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