.gitlab-ci.yml 1.22 KB
Newer Older
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
1
2
3
4
# Uncomment if you want to use docker-in-docker
# image: gsiupm/dockermake:latest
# services:
# - docker:dind
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
5
6
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
7

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
8
variables:
J. Fernando Sánchez's avatar
Fix 4    
J. Fernando Sánchez committed
9
  IMAGENAME: $CI_REGISTRY_IMAGE
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
10

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
11
12
stages:
  - test
13
  - push
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
14
  - deploy
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
15
  - clean
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
16

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
17
18
19
before_script:
  - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
20
.test: &test_definition
21
  stage: test
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
22
  script:
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
23
    - make -e test-$PYTHON_VERSION
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
24
    
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
25
26
test-3.5:
  <<: *test_definition
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
27
28
  variables:
    PYTHON_VERSION: "3.5"
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
29
30
31

test-2.7:
  <<: *test_definition
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
32
33
  variables:
    PYTHON_VERSION: "2.7"
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
34
35

.image: &image_definition
36
  stage: push
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
37
  script:
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
38
    - make -e push-$PYTHON_VERSION
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
39
  only:
40
41
    - tags
    - triggers
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
42

43
push-3.5:
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
44
45
  <<: *image_definition
  variables:
46
    PYTHON_VERSION: "3.5"
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
47

48
push-2.7:
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
49
50
  <<: *image_definition
  variables:
51
    PYTHON_VERSION: "2.7"
52

53
push-latest:
54
  <<: *image_definition
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
55
  variables:
56
    PYTHON_VERSION: latest
57
58
  only:
    - master
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
59
60
    - triggers

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
61
62
63
64
65
66
67
68
deploy:
  stage: deploy
  environment: test
  script:
    - make -e deploy
  only:
    - master

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
69
70
71
72
73
74
75
76
push-github:
  stage: deploy
  script:
    - make -e push-github
  only:
    - master
    - triggers

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
77
78
79
clean :
  stage: clean
  script:
80
    - make -e clean
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
81
  when: manual