-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
71 lines (66 loc) · 1.7 KB
/
.gitlab-ci.yml
File metadata and controls
71 lines (66 loc) · 1.7 KB
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
63
64
65
66
67
68
69
70
71
stages:
- install
- checks
- deploy
install:
stage: install
image: registry.gitlab.com/adaptivestone/ubuntu-node:latest
script:
- npm ci
artifacts:
paths:
- node_modules/
expire_in: 2 hour
quality:
stage: checks
image: registry.gitlab.com/adaptivestone/ubuntu-node:latest
needs:
- install
allow_failure: true
script:
- npm run check
tests:
services:
- redis:latest
variables:
REDIS_URI: redis://redis
EMAIL_TRANSPORT: stub
stage: checks
image: registry.gitlab.com/adaptivestone/ubuntu-node:latest
needs:
- install
dependencies:
- install
script:
- npm run test
coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
artifacts:
when: always
paths:
- coverage/rspec.xml
reports:
junit: coverage/rspec.xml
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml
# deploy_production:
# image: registry.gitlab.com/adaptivestone/ubuntu-node:latest
# stage: deploy
# dependencies: [] # do not download atrifacts
# variables:
# GIT_STRATEGY: none
# environment:
# name: production
# url: http://test.com/
# script:
# - apt-get update -qq
# # - apt-get install -qq git
# # # Setup SSH deploy keys
# - "which ssh-agent || ( apt-get install -qq openssh-client )"
# - eval $(ssh-agent -s)
# - ssh-add <(echo "$SSH_PRIVATE_KEY")
# - mkdir -p ~/.ssh
# - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
# - ssh ubuntu@api.test.com "cd /var/www/nameProject && git reset --hard && git checkout main && git pull && npm i && pm2 restart nameProject && npm run cli migration/migrate && exit"
# only:
# - main