.gitlab-ci.yml 1.25 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
  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
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
    - tags
41
    - master
42
    - triggers
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
43
44
45
46

image-3.5:
  <<: *image_definition
  variables:
47
    PYTHON_VERSION: "3.5"
48
49
    VERSION: $CI_BUILD_TAG
    IMAGENAME: $CI_REGISTRY_IMAGE
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
50
51
52
53

image-2.7:
  <<: *image_definition
  variables:
54
    PYTHON_VERSION: "2.7"
55
56
    VERSION: $CI_BUILD_TAG
    IMAGENAME: $CI_REGISTRY_IMAGE
57
58
59

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

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