.gitlab-ci.yml 1.77 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
services:
8
  - registry-gitlab.pasteur.fr/dsi-tools/docker-images/docker:dind
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
9
10
11
12
13

variables:
  DOCKER_HOST: tcp://localhost:2375


Amine  GHOZLANE's avatar
Amine GHOZLANE committed
14
build_dev:
15
  image: registry-gitlab.pasteur.fr/dsi-tools/docker-images/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
    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
21
    # - docker pull aghozlane/shaman:latest || true
22
23
24
    - docker build 
      --tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA"
      .
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
25
26
27
    - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA"
  only:
    - dev
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
28
    - master
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
29
30

build_master:
31
  image: registry-gitlab.pasteur.fr/dsi-tools/docker-images/docker:latest
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
32
33
34
35
36
  stage: build_master
  variables:
    CI_DEBUG_TRACE: "false"
  script:
    - docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
37
    # - docker pull aghozlane/shaman:latest || true
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
38
    - docker build -t aghozlane/shaman .
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
39
    - docker push aghozlane/shaman
40
  only:
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
41
    - master
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
42
43


Amine  GHOZLANE's avatar
Amine GHOZLANE committed
44
build_conda:
45
46
  #image: continuumio/miniconda3:latest mutex issue
  image: conda/miniconda3-centos7:latest
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
47
  stage: build_conda
48
49
  variables:
    CI_DEBUG_TRACE: "false"
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
50
51
52
53
54
55
  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
56
    - conda update conda
57
58
59
    - conda install -y conda-verify
    - conda install -y anaconda-client
    - conda install -y conda-build
60
    - conda install -y git
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
61
    - conda config --set anaconda_upload no
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
62
  script:
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
63
    - res=$(conda build conda_inst --output)
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
64
    - anaconda login --username "$DOCKER_USER" --password "$DOCKER_PASS"
Amine  GHOZLANE's avatar
Amine GHOZLANE committed
65
    - anaconda upload $res
66
67
68
  except:
    - dev
    - master