forked from VILLASframework/web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
65 lines (57 loc) · 1.2 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
DOCKER_IMAGE: ${CI_REGISTRY_IMAGE}
stages:
- build
- deploy
build:
stage: build
image:
name: docker
variables:
BRANDING: villasweb
DOCKER_TAG: ${CI_COMMIT_BRANCH}-${BRANDING}
script:
- docker build --build-arg REACT_APP_BRAND=${BRANDING} --tag ${DOCKER_IMAGE}:${DOCKER_TAG} .
tags:
- docker
build.slew:
variables:
BRANDING: slew
DOCKER_TAG: ${CI_COMMIT_BRANCH}-${BRANDING}
extends: build
build.opalrt:
variables:
BRANDING: opalrt
DOCKER_TAG: ${CI_COMMIT_BRANCH}-${BRANDING}
extends: build
deploy:
stage: deploy
variables:
BRANDING: villasweb
DOCKER_TAG: ${CI_COMMIT_BRANCH}-${BRANDING}
before_script:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
script:
- docker push ${DOCKER_IMAGE}:${DOCKER_TAG}
tags:
- docker
dependencies:
- build
deploy.slew:
extends: deploy
variables:
BRANDING: slew
DOCKER_TAG: ${CI_COMMIT_BRANCH}-${BRANDING}
deploy.opalrt:
extends: deploy
variables:
BRANDING: opalrt
DOCKER_TAG: ${CI_COMMIT_BRANCH}-${BRANDING}
deploy.latest:
extends: deploy
variables:
DOCKER_TAG: latest
only:
refs:
- master