-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
65 lines (59 loc) · 1.51 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
variables:
GIT_SUBMODULE_STRATEGY: normal
stages:
- build
- deploy
build:
# Official docker image.
retry: 2
image: docker:stable
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- apk add git openssh make bash
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker info
script:
- make push -C dispatcher-container
- bash make.sh compute-version > version-long
artifacts:
untracked: true
only:
- master
- ci
- tags
deploy-staging:
retry: 2
image: alpine/helm
stage: deploy
dependencies:
- build
before_script:
- apk add git openssh make bash curl
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.astro.unige.ch/oda/site-config.git
- cp -fv site-config/dispatcher/values-unige-dstic-staging.yaml .
script:
- export ODA_NAMESPACE=oda-staging
- export ODA_SITE=unige-dstic-staging
- bash make.sh upgrade
only:
- master
- ci
deploy-production:
retry: 2
image: alpine/helm
stage: deploy
dependencies:
- build
before_script:
- apk add git openssh make bash curl
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.astro.unige.ch/oda/site-config.git
- cp -fv site-config/dispatcher/values-unige-dstic-production.yaml .
script:
- export ODA_NAMESPACE=oda-production
#- export ODA_NAMESPACE=oda-staging-$CI_COMMIT_TAG # make review?
- export ODA_SITE=unige-dstic-production
- bash make.sh upgrade
only:
- tags