-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
112 lines (97 loc) · 3.32 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
stages:
- test
- build
test:
stage: test
except:
- production
- master
image: registry.orr.noaa.gov/gnome/oillibrary:develop
script:
- yum install gcc gcc-c++ -y
- yum install netcdf-devel -y # needed by the C++ code -- it can't find the conda versions
# we're shouldn't need matplotlib for tests or deployment ...
- yum install libXext libSM libXrender -y # needed by matplotlib on CentOS
# install the requirements
- conda install --file conda_requirements.txt
- cd ./py_gnome
- python ./setup.py install
- cd tests/unit_tests && pytest
tags:
- docker
test_master:
stage: test
only:
- master
image: registry.orr.noaa.gov/gnome/oillibrary:master
script:
- yum install gcc gcc-c++ -y
- yum install netcdf-devel -y # needed by the C++ code -- it can't find the conda versions
# we're shouldn't need matplotlib for tests or deployment ...
- yum install libXext libSM libXrender -y # needed by matplotlib on CentOS
# install the requirements
- conda install --file conda_requirements.txt
- cd ./py_gnome
- python ./setup.py install
- cd tests/unit_tests && pytest
tags:
- docker
test_production:
stage: test
only:
- production
image: registry.orr.noaa.gov/gnome/oillibrary:production
script:
- yum install gcc gcc-c++ -y
- yum install netcdf-devel -y # needed by the C++ code -- it can't find the conda versions
# we're shouldn't need matplotlib for tests or deployment ...
- yum install libXext libSM libXrender -y # needed by matplotlib on CentOS
# install the requirements
- conda install --file conda_requirements.txt
- cd ./py_gnome
- python ./setup.py install
- cd tests/unit_tests && pytest
tags:
- docker
develop:
stage: build
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull registry.orr.noaa.gov/gnome/oillibrary:develop
- docker tag registry.orr.noaa.gov/gnome/oillibrary:develop oillibrary
- docker build -f dockerfile . -t registry.orr.noaa.gov/gnome/pygnome:develop
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push registry.orr.noaa.gov/gnome/pygnome:develop
only:
- develop
tags:
- shell
- build
master:
stage: build
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull registry.orr.noaa.gov/gnome/oillibrary:master
- docker tag registry.orr.noaa.gov/gnome/oillibrary:master oillibrary
- docker build -f dockerfile . -t registry.orr.noaa.gov/gnome/pygnome:master
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push registry.orr.noaa.gov/gnome/pygnome:master
only:
- master
tags:
- shell
- build
production:
stage: build
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull registry.orr.noaa.gov/gnome/oillibrary:production
- docker tag registry.orr.noaa.gov/gnome/oillibrary:production oillibrary
- docker build -f dockerfile . -t registry.orr.noaa.gov/gnome/pygnome:production
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push registry.orr.noaa.gov/gnome/pygnome:production
only:
- production
tags:
- shell
- build