forked from cilindrox/jackrabbit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
70 lines (58 loc) · 1.59 KB
/
cloudbuild.yaml
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
steps:
- id: lint-yaml
name: 'gcr.io/$PROJECT_ID/cloudbuilders/yamllint:1.20.0'
args: ["-d", "relaxed", "."]
waitFor: ['-']
- id: lint-docker
name: 'gcr.io/$PROJECT_ID/cloudbuilders/hadolint:1.18.0'
args:
- Dockerfile
waitFor: ['-']
- id: npm-lockfile
name: node:18.12
secretEnv: ['NPM_TOKEN']
entrypoint: npm
args: ['i', '--quiet', '--package-lock-only']
- id: npm-audit
name: 'gcr.io/$PROJECT_ID/cloudbuilders/audit-exclude'
secretEnv: ['NPM_TOKEN']
entrypoint: '/bin/ash'
args:
- -c
- npm audit --production --json | audit-exclude
- id: docker-compose
name: 'gcr.io/cloud-builders/docker'
args: ['compose', 'up', '-d', '--wait' ]
waitFor: ['npm-audit', 'lint-yaml', 'lint-docker']
- id: npm-ci
name: node:18.12
secretEnv: ["NPM_TOKEN"]
entrypoint: npm
args: [ 'ci', '--quiet']
waitFor: ['npm-lockfile']
- id: test-e2e
name: node:18.12
secretEnv: ["NPM_TOKEN"]
entrypoint: npm
args: ['test']
env:
- 'NODE_ENV=test'
- 'RABBIT_URL=amqp://admin:admin@rabbitmq:5672'
waitFor: [ 'npm-ci', 'docker-compose' ]
- id: npm-publish
name: 'gcr.io/$PROJECT_ID/cloudbuilders/npm:6.13.4'
secretEnv: ['NPM_TOKEN']
env:
- 'TAG_NAME=$TAG_NAME'
- '_PR_NUMBER=$_PR_NUMBER'
waitFor: ['test-e2e']
timeout: 10m
logsBucket: 'gs://$PROJECT_ID-primary-cloudbuild-logs'
tags:
- 'backend'
- 'npm'
- 'nodejs'
availableSecrets:
secretManager:
- versionName: projects/145393225073/secrets/npm-token-publish/versions/latest
env: NPM_TOKEN