.gitlab-ci.yml 1.83 KB
Newer Older
1
# CI / CD for the fsl/conda/installer project.
2
#
3
# Unit tests are run every time commits are
4
5
6
7
8
9
10
11
# pushed to any branch.
#
# Release jobs are run every time a new tag
# is added. Release jobs assume that they
# are running in an environment with a
# directory $FSLINSTALLER_DEPLOY_DIRECTORY
# into which the fslinstaller.py script can
# be copied.
12
13
stages:
  - test
14
15
  - release

16
# Don't run pipeline on MRs
17
18
workflow:
  rules:
19
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
20
      when: never
21
    - when: always
22

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# These variables should be set as CI/CD variables in
# the fsl/conda/installer project via the GitLab UI.
variables:

  # Directory in which new versions of the
  # installer script should be copied into.
  FSLINSTALLER_DEPLOY_DIRECTORY: "/"

  # GitLab API token with enough privileges to push a
  # branch to the fsl/conda/manifest repository, and open
  # a merge request.  Used by the update_manifest.py
  # script to update the FSL release manifest file when a
  # new fslinstaller version is tagged.
  FSL_CI_API_TOKEN: ""

39

40
.test-template:
41
42
43
44
45
  stage: test
  tags:
    - fsl-ci
    - docker
  rules:
Paul McCarthy's avatar
Paul McCarthy committed
46
    - if: '$CI_COMMIT_TAG == null'
47
  script:
48
    - bash ./.ci/unit_tests.sh
49

50
51
52
test:py27:
  extends: .test-template
  image:    python:2.7
53

54
55
56
test:py33:
  extends: .test-template
  image:    python:3.3
57

58
59
60
test:py34:
  extends: .test-template
  image:    python:3.4
61

62
63
64
test:py35:
  extends: .test-template
  image:    python:3.5
65

66
67
68
test:py36:
  extends: .test-template
  image:    python:3.6
69

70
71
72
test:py37:
  extends: .test-template
  image:    python:3.7
73

74
75
76
test:py38:
  extends: .test-template
  image:    python:3.8
77

78
79
test:py39:
  extends: .test-template
80
81
82
83
84
85
86
87
88
89
  image:    python:3.9


release:
  image: python:3.9
  tags:
    - fsl-ci
    - fslconda-channel-host
  rules:
    - if: '$CI_COMMIT_TAG != null'
Paul McCarthy's avatar
Paul McCarthy committed
90
      when: manual
91
92
  script:
    - bash ./.ci/new_release.sh