-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
48 lines (45 loc) · 895 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
48
stages:
- build
- deploy
- schedules
# This file is a template, and might need editing before it works on your project.
docker-build-master:
# Official docker image.
image: docker:latest
stage: build
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
only:
- master
except:
- schedules
deploy:
stage: deploy
image: $CI_REGISTRY_IMAGE
script:
- cd /home/pptruser
- npm run start
environment:
name: job/task_run
when: manual
only:
refs:
- master
except:
- schedules
schedules:
stage: schedules
image: $CI_REGISTRY_IMAGE
script:
- cd /home/pptruser
- npm run start
environment:
name: job/task_run
only:
refs:
- schedules