-
Notifications
You must be signed in to change notification settings - Fork 148
/
Copy path.gitlab-ci.yml
43 lines (40 loc) · 1.02 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
---
# @Description Install npm packages
npm-install:
stage: build
image: node:16.10.0-alpine3.14
needs: []
cache:
- { key: npm-cache, paths: [.npm] }
- { key: { files: [package-lock.json] }, paths: [node_modules] }
artifacts:
paths: [node_modules/]
script:
- npm install --no-audit --no-progress --cache .npm
# @Description Find outdated packages in node_modules
npm-outdated:
stage: test
image: node:16.10.0-alpine3.14
allow_failure: true
needs: [npm-install]
script:
- npx -s ncu -e2 --deprecated --packageFile package.json
# @Description Up docker-compose services
docker-compose-up:
stage: deploy
needs: [npm-install]
environment:
url: http://localhost:8891
name: local
script:
- docker compose up -d
# @Description Down docker-compose services
docker-compose-down:
stage: .post
rules:
# This job will only run locally, and only when manually started
- { if: $GITLAB_CI == 'false', when: 'manual' }
environment:
name: local
script:
- docker compose down