-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
46 lines (43 loc) · 1.21 KB
/
cloudbuild.yaml
File metadata and controls
46 lines (43 loc) · 1.21 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
---
timeout: 1800s
steps:
# Install deps.
- name: 'node:12'
entrypoint: 'npm'
id: 'npm-install'
args:
- 'install'
# Run build
- name: 'node:12'
entrypoint: 'npm'
id: 'npm-run-build'
args:
- 'run'
- 'build'
# Get git history since it's required by semantic-release
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:latest'
entrypoint: bash
id: 'get-git-history'
args:
- '-c'
- |
git clone https://github.com/vwt-digital/dynamic-data-manipulation-tool.git --branch=master --no-checkout
cp -r dynamic-data-manipulation-tool/.git .
rm -rf dynamic-data-manipulation-tool
# Publish package.
- name: 'node:12'
entrypoint: 'bash'
id: 'npm-run-semantic-release'
args:
- '-c'
- |
export GH_TOKEN="$$_GITHUB_TOKEN"
export NPM_TOKEN="$$_NPM_TOKEN"
npm run semantic-release
secretEnv: ['_GITHUB_TOKEN', '_NPM_TOKEN']
availableSecrets:
secretManager:
- versionName: projects/${PROJECT_ID}/secrets/${PROJECT_ID}-github-token/versions/latest
env: '_GITHUB_TOKEN'
- versionName: projects/${PROJECT_ID}/secrets/${PROJECT_ID}-npm-token/versions/latest
env: '_NPM_TOKEN'