-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
129 lines (117 loc) · 3 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# This is NOT a job and will be ignored by GitLab-CI
.shared_hidden_key: &shared_deploy # This is an anchor
before_script:
- apk --no-cache add git
- echo "${CI_REGISTRY_PASSWORD}" | docker login -u "${CI_REGISTRY_USER}" --password-stdin ${CI_REGISTRY}
script:
- export VERSION=`git log -1 --pretty=%H`
- docker build --no-cache --pull --network host -t ${CI_REGISTRY_ORGANIZATION}/alma-${name}:${VERSION} -f ${module}/Dockerfile ${module}/
- docker push ${CI_REGISTRY_ORGANIZATION}/alma-${name}:${VERSION}
stage: deploy
image: docker:latest
services:
- docker:dind
build_data:
stage: build
image: gradle:jdk11
artifacts:
paths:
- data/build
script:
# This will install WCSLib include WCS cutouts.
- export CURR_DIR
- apt-get update && apt-get install -y curl gcc git make
- curl -Lv -o /tmp/wcslib.tar.bz2 https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/wcslib/5.15-1/wcslib_5.15.orig.tar.bz2
- cd /tmp/ && tar jxvf wcslib.tar.bz2 && cd wcslib-5.15
- ./configure --prefix=/usr
- make && make install
- cd ${CI_PROJECT_DIR}/data && ../gradlew -i clean build test
build_datalink:
stage: build
image: gradle:jdk11
artifacts:
paths:
- datalink/build
script:
- cd alma-lib && ../gradlew -i clean build test publishToMavenLocal
- cd ../datalink && ../gradlew -i clean build test
build_tap:
stage: build
image: gradle:jdk11
artifacts:
paths:
- tap/build
script:
- cd tap && ../gradlew -i clean build test
build_reg:
stage: build
image: gradle:jdk11
artifacts:
paths:
- reg/build
script:
- cd reg && ../gradlew -i clean build test
build_sia:
stage: build
image: gradle:jdk11
artifacts:
paths:
- sia/build
script:
- cd sia && ../gradlew -i clean build test
build_soda:
stage: build
image: gradle:jdk11
artifacts:
paths:
- soda/build
script:
- cd alma-lib && ../gradlew -i clean build test publishToMavenLocal
- cd ../soda && ../gradlew -i clean build test
deploy_data:
variables:
name: data
module: data
needs:
- build_data
- build_tomcat
<<: *shared_deploy # This is a reference to the anchor above.
deploy_datalink:
variables:
name: datalink
module: datalink
needs:
- build_datalink
<<: *shared_deploy # This is a reference to the anchor above.
deploy_reg:
variables:
name: reg
module: reg
needs:
- build_reg
- build_tomcat
<<: *shared_deploy # This is a reference to the anchor above.
deploy_sia:
variables:
name: sia
module: sia
needs:
- build_sia
- build_tomcat
<<: *shared_deploy # This is a reference to the anchor above.
deploy_soda:
variables:
name: soda
module: soda
needs:
- build_soda
- build_tomcat
<<: *shared_deploy # This is a reference to the anchor above.
deploy_tap:
variables:
name: tap
module: tap
needs:
- build_tap
- build_tomcat
<<: *shared_deploy # This is a reference to the anchor above.