-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
49 lines (44 loc) · 1.04 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
# gitlab scanning
include:
- template: Dependency-Scanning.gitlab-ci.yml
- template: License-Scanning.gitlab-ci.yml
- template: SAST.gitlab-ci.yml
- template: Secret-Detection.gitlab-ci.yml
- template: Container-Scanning.gitlab-ci.yml
variables:
GIT_DEPTH: "2" # Tells git to fetch all the branches of the project, required by the analysis task
DOCKER_DRIVER: overlay2
stages:
- build
- test
- deploy
# builds app
build:
# node docker image on which this would be run
image: node:14.16.1-alpine3.13
stage: build
script:
- npm install
tags:
- docker
docker_build:
image: docker:stable
stage: build
services:
- docker:19.03.12-dind
variables:
IMAGE: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
script:
- docker info
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker build -t $IMAGE .
- docker push $IMAGE
deployToDev:
stage: deploy
script:
- docker-compose down
- docker-compose up --build -d
when:
manual
tags:
- nftdev1