.gitlab-ci.yml 1.41 KB
Newer Older
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
1
stages:
2
  - build_conda
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
3 4
  - build_dev
  - build_master
5
  
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
6

Amine  GHOZLANE's avatar
Amine GHOZLANE committed
7 8 9 10 11 12 13
services:
  - docker:dind

variables:
  DOCKER_HOST: tcp://localhost:2375


Amine  GHOZLANE's avatar
Amine GHOZLANE committed
14
build_dev:
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
15
  image: docker:latest
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
16
  stage: build_dev
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
17 18 19
  variables:
    CI_DEBUG_TRACE: "false"
  script:
20 21 22 23
    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
    - docker build 
      --tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA"
      .
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
24 25 26
    - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA"
  only:
    - dev
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
27
    - master
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
28 29 30 31 32 33 34 35 36

build_master:
  image: docker:latest
  stage: build_master
  variables:
    CI_DEBUG_TRACE: "false"
  script:
    - docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
    - docker build -t aghozlane/shaman .
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
37
    - docker push aghozlane/shaman
38
  only:
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
39
    - master
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
40 41


Amine  GHOZLANE's avatar
Amine GHOZLANE committed
42
build_conda:
43 44
  #image: continuumio/miniconda3:latest mutex issue
  image: conda/miniconda3-centos7:latest
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
45
  stage: build_conda
46 47
  variables:
    CI_DEBUG_TRACE: "false"
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
48 49 50 51 52 53
  before_script:
    - conda config --add channels bioconda
    - conda config --add channels conda-forge
    - conda config --add channels r
    - conda config --add channels aghozlane
    - conda config --set anaconda_upload yes
54 55 56
    - conda install -y conda-verify
    - conda install -y anaconda-client
    - conda install -y conda-build
57
    - conda install -y git
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
58 59
  script:
    - anaconda login --username "$DOCKER_USER" --password "$DOCKER_PASS"
60 61 62 63
    - conda build conda_inst
  except:
    - dev
    - master