Mentions légales du service

Skip to content
Snippets Groups Projects
Commit a73b4ae7 authored by GACON Florian's avatar GACON Florian
Browse files

Add docker build job

parent e81b95ac
No related branches found
No related tags found
No related merge requests found
*.egg-info
......@@ -19,6 +19,7 @@ default:
conda_build:
stage: build
before_script:
- echo skip before_script
script:
- conda update -n base -c defaults conda
- conda install conda-build git anaconda-client conda-verify
......@@ -54,6 +55,7 @@ coverage:
anaconda_master :
stage: deploy
before_script:
- echo skip before_script
script:
- conda update -n base -c defaults conda
- conda update --all
......@@ -70,6 +72,7 @@ anaconda_master :
anaconda_develop :
stage: deploy
before_script:
- echo skip before_script
script:
- conda update -n base -c defaults conda
- conda update --all
......@@ -101,3 +104,22 @@ pages:
only:
- develop
- master
docker_build_deploy:
image: docker:latest
stage: deploy
services:
- docker:dind
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $IMAGE_TAG .
- docker push $IMAGE_TAG
retry:
max: 2
when: runner_system_failure
only:
- develop
- master
# To build:
# docker build -t bvpy .
# To run:
# docker run -it bvpy
# To purge build:
# docker rm $(docker ps -a -q)
# To purge images:
# docker images -a | grep "pattern" | awk '{print $3}' | xargs docker rmi
FROM continuumio/miniconda3
MAINTAINER Florian Gacon <florian.gacon@inria.fr>
USER root
SHELL ["/bin/bash","--login", "-c"]
COPY src /opt/bvpy/src
COPY setup.py /opt/bvpy
COPY README.rst /opt/bvpy
COPY HISTORY.rst /opt/bvpy
COPY conda/env.yaml /opt/bvpy
WORKDIR /home/bvpy
ENV CONDA_DIR=/opt/conda
ENV PATH /opt/conda/envs/bvpy/bin:$PATH
RUN conda init bash && \
conda update -n base -c defaults conda && \
conda env create -f /opt/bvpy/env.yaml && \
echo "source activate bvpy" > ~/.bashrc && \
source /root/.bashrc && \
cd /opt/bvpy && python setup.py install && \
conda clean -afy
CMD ["/bin/bash", "-c""]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment