-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
executable file
·62 lines (53 loc) · 1.21 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
image: node:alpine
services:
- name: docker:dind
entrypoint: ["env", "-u", "DOCKER_HOST"]
command: ["dockerd-entrypoint.sh"]
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
# See https://github.com/docker-library/docker/pull/166
DOCKER_TLS_CERTDIR: ""
cache:
key: '$CI_BUILD_REPO'
paths:
- node_modules/
stages:
- build
- docker-build
# ------------------------------------------------------------------
# Build Anchors
# ------------------------------------------------------------------
.build_environment:
image: docker:$DOCKER_VERSION
script:
- docker login -u ssegning -p $DOCKER_PASSWORD
- docker build --pull -t bayamsell/sms-test-console:${TAG_NAME} .
- docker push bayamsell/sms-test-console
app_build:
stage: build
script:
- yarn --non-interactive --silent
- yarn build
artifacts:
paths:
- dist/
- package.json
app_prod:
extends: .build_environment
stage: docker-build
variables:
TAG_NAME: "latest"
environment:
name: Production
only:
- master
app_develop:
extends: .build_environment
stage: docker-build
variables:
TAG_NAME: "dev-$CI_BUILD_ID"
environment:
name: Dev
only:
- develop