-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
64 lines (57 loc) · 1.44 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
stages:
- test
- deploy
variables:
POSTGRES_PASSWORD: password
POSTGRES_USER: user
POSTGRES_DB: inventory
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
test:
stage: test
image: node:18
services:
- postgres:15.2
- name: minio/minio
alias: minio
command: ['server', '/data']
script:
- npm install
- npm run format:check
- npm run lint:quiet
- npm run check
- npm run test:coverage
variables:
DB_URL: postgres://user:password@postgres:5432/inventory
DB_DROP_SCHEMA: 'true'
DB_ENABLE_SYNCHRONIZE: 'true'
S3_URI: http://minio:minio123@minio:9000/
JWT_SECRET: secret
IBAN_VALIDATOR_URL: http://hub2.delinternet.com:5004
HUB_API_ADDRESS: http://api.hub2.delinternet.com/api/v1
APP_URL: http://inventory.delinternet.com
QR_CODE_URL_TEMPLATE: https://example.com/qr/{code}
artifacts:
when: always
reports:
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml
junit:
- junit.xml
except:
- tags
deploy:
stage: deploy
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint: ['']
script:
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--build-arg VERSION=$CI_COMMIT_TAG
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
--destination "${CI_REGISTRY_IMAGE}:latest"
only:
- tags