-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
47 lines (39 loc) · 910 Bytes
/
.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
stages:
- build_image
- deploy
variables:
DOCKER_IMAGE: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}
DOCKER_TLS_CERTDIR: ""
.build:
stage: build_image
image: docker
services:
- docker:dind
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker build -t ${DOCKER_IMAGE} -f Dockerfile .
- docker push ${DOCKER_IMAGE}
- docker logout $CI_REGISTRY
.deploy:
stage: deploy
image: dockerhub.ebi.ac.uk/ensembl-web/deploy-tools:latest
script:
- sed -i "s#<DOCKER_IMAGE>#${DOCKER_IMAGE}#g" transplantdb_deployment.yaml
- kubectl apply -f transplantdb_deployment.yaml
Docker:
extends: .build
only:
- deploy-k8s
Live:WP41-HX:
extends: .deploy
environment:
name: wp41-hx-static
only:
- deploy-k8s
Live:WP40-HL:
extends: .deploy
environment:
name: wp40-hl-static
only:
- deploy-k8s