-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
54 lines (49 loc) · 977 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
49
50
51
52
53
54
include:
- template: Dependency-Scanning.gitlab-ci.yml
- template: License-Scanning.gitlab-ci.yml
- template: SAST.gitlab-ci.yml
stages:
- test
- build
- swagger
- deploy
build:
image: node:12
stage: build
script:
- npm install
cache:
paths:
- node_modules
artifacts:
paths:
- /*
tags:
- docker
swagger:
stage: swagger
dependencies:
- build
script:
- mkdir -p "/var/www/swagger/nh5050/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHORT_SHA"
- cp docs/swagger.yaml "/var/www/swagger/nh5050/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHORT_SHA"
- cp docs/swagger.yaml "/var/www/swagger/nh5050/$CI_COMMIT_REF_NAME"
tags:
- swagger
deployToDev:
stage: deploy
script:
- docker build . -t 5050-backend
- deployBackend
only:
- develop
tags:
- 5050dev
deployToStaging:
stage: deploy
script:
- cp -R ../NH5050-backend $PROJECT_DIR
- deployBackend
tags:
- 5050stage
when: manual