.gitlab-ci.yml 1.22 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
  - push
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
14
  - clean
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
15
16

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

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

31

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

50
push-2.7:
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
51
52
  <<: *image_definition
  variables:
53
    PYTHON_VERSION: "2.7"
54
55
    VERSION: $CI_BUILD_TAG
    IMAGENAME: $CI_REGISTRY_IMAGE
56

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

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