-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
52 lines (47 loc) · 1.35 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
variables:
GIT_SUBMODULE_STRATEGY: normal
stages:
- build
- deploy
build:
# Official docker image.
image: docker:stable
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- apk add git openssh make bash curl
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker info
script:
- make container
- make push -C frontend-container
- (cd frontend-container; bash make.sh compute-version) > version-short.txt
- cp -fv frontend-container/version.yaml .
- cat version.yaml
artifacts:
untracked: true
only:
- master
- ci
deploy:
image: alpine/helm
stage: deploy
dependencies:
- build
before_script:
- apk add git openssh make bash curl python3 py3-pip
- pip install --upgrade jinja2 pyyaml
- curl -o /usr/bin/kubectl -L "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
- chmod +x /usr/bin/kubectl
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.astro.unige.ch/oda/site-config.git
- cp -fv version.yaml frontend-container/version.yaml
- cp -fv site-config/frontend/values-unige-dstic-staging.yaml .
script:
- export ODA_NAMESPACE=oda-staging
- export ODA_SITE=unige-dstic-staging
- ls -lR
- bash make.sh upgrade
only:
- master
- ci