forked from Ensembl/ensembl-website-help-and-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
41 lines (35 loc) · 843 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
stages:
- build
- deploy
variables:
DOCKER_IMAGE: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}
DOCKER_TLS_CERTDIR: ""
.build:
stage: build
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} --no-cache .
- docker push ${DOCKER_IMAGE}
- docker rmi ${DOCKER_IMAGE}
- docker logout $CI_REGISTRY
.deploy:
stage: deploy
image: dockerhub.ebi.ac.uk/kamal/deploy-tools:0.1
script:
- sed -i "s#<DOCKER_IMAGE>#${DOCKER_IMAGE}#g" k8s/deployment.yaml
- kubectl apply -f k8s/deployment.yaml
- kubectl apply -f k8s/service-node.yaml
build:
extends: .build
# only:
# - master
deploy:
extends: .deploy
environment:
name : wp-hx-dev
# only:
# - master