forked from NOAA-GFDL/FRE-NCtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
106 lines (97 loc) · 2.06 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
# ******************************************************************************
# gitlab-ci.yml file to build and deploy fre-nctools
# ******************************************************************************
before_script:
- hostname
variables:
buildDir: build.${FRE_SITE}.${CI_COMMIT_REF_SLUG}
CONFIG_SITE: ${CI_PROJECT_DIR}/site-configs/${FRE_SITE}/config.site
.buildScript: &buildScript
script:
- . ${CI_PROJECT_DIR}/site-configs/${FRE_SITE}/env.sh
- autoreconf -i
- mkdir ${buildDir}
- cd ${buildDir}
- ../configure --prefix=${FMS_HOME}/local/opt/fre-nctools/test/${FRE_SITE}
- make -j
- make -j check
artifacts:
expire_in: 1 month
paths:
- ${CI_PROJECT_DIR}/build.${FRE_SITE}.${CI_COMMIT_REF_SLUG}
.deployScript: &deployScript
script:
- cd ${CI_PROJECT_DIR}
- . ${CI_PROJECT_DIR}/site-configs/${FRE_SITE}/env.sh
- autoreconf -i
- cd ${CI_PROJECT_DIR}/${buildDir}
- make install
build:gfdl-ws:
stage: build
tags:
- gfdl-ws
variables:
GIT_STRATEGY: clone
FRE_SITE: gfdl-ws
FMS_HOME: /home/fms
<<: *buildScript
build:gfdl:
stage: build
tags:
- gfdl
variables:
GIT_STRATEGY: clone
FRE_SITE: gfdl
FMS_HOME: /home/fms
<<: *buildScript
build:ncrc:
stage: build
tags:
- ncrc
variables:
GIT_STRATEGY: clone
FRE_SITE: ncrc
FMS_HOME: /ncrc/home2/fms
<<: *buildScript
deploy:gfdl-ws:
stage: deploy
tags:
- gfdl-ws_deploy
environment:
name: stage_gfdl-ws
variables:
FRE_SITE: gfdl-ws
FMS_HOME: /home/fms
only:
- master
dependencies:
- build:gfdl-ws
<<: *deployScript
deploy:gfdl:
stage: deploy
tags:
- gfdl_deploy
environment:
name: stage_gfdl
variables:
FRE_SITE: gfdl
FMS_HOME: /home/fms
only:
- master
dependencies:
- build:gfdl
<<: *deployScript
deploy:ncrc:
stage: deploy
tags:
- ncrc_deploy
environment:
name: stage_ncrc
variables:
FRE_SITE: ncrc
FMS_HOME: /ncrc/home2/fms
only:
- master
dependencies:
- build:ncrc
<<: *deployScript