.gitlab-ci.yml 1.17 KB
Newer Older
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
1
image: gsiupm/dockermake:latest
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
2
3
4
5
6
7


# When using dind, it's wise to use the overlayfs driver for
# improved performance.
variables:
  DOCKER_DRIVER: overlay
8
  DOCKERFILE: Dockerfile
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
9
  VERSION: $CI_BUILD_REF
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
  - images
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
14
  - release
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
17

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

test-2.7:
  <<: *test_definition
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
29
30
  variables:
    PYTHON_VERSION: "2.7"
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
31

32

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
33
.image: &image_definition
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
34
  stage: images
35
36
  variables:
    PYTHON_VERSION: "3.5"
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
37
38
    VERSION: $CI_BUILD_TAG
    IMAGENAME: $CI_REGISTRY_IMAGE
39
40
  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
41
  script:
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
42
    - make -e push-$PYTHON_VERSION
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
43
  only:
44
45
    - tags
    - triggers
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
46
47
48
49

image-3.5:
  <<: *image_definition
  variables:
50
    PYTHON_VERSION: "3.5"
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
51
52
53
54

image-2.7:
  <<: *image_definition
  variables:
55
56
57
58
    PYTHON_VERSION: "2.7"

image-latest:
  stage: release
59
60
  before_script:
    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
61
  script:
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
62
    - make -e push-latest
63
64
  only:
    - master
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
65
66
67
68
69
70
    - triggers

clean :
  stage: clean
  script:
    - make -e clean