-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
27 lines (27 loc) · 934 Bytes
/
cloudbuild.yaml
File metadata and controls
27 lines (27 loc) · 934 Bytes
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
---
steps:
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/$PROJECT_ID/npm', '.']
# storing storj API key in file
- name: gcr.io/cloud-builders/gcloud
entrypoint: 'bash'
args: ["-c","gcloud secrets versions access latest --secret=StorjAPIKey >>./secret.txt" ]
# running npm install command
- name: 'gcr.io/${PROJECT_ID}/npm'
entrypoint: 'npm'
args: ["install"]
# building module using node-gyp module
- name: 'gcr.io/${PROJECT_ID}/npm'
entrypoint: 'bash'
args: ["-c","make && node-gyp configure && node-gyp rebuild"]
# install typescript
- name: 'gcr.io/${PROJECT_ID}/npm'
entrypoint: 'bash'
args: ["-c","npm install -g typescript && tsc && tsc ./test/testcase.ts"]
# running testcases
- name: 'gcr.io/${PROJECT_ID}/npm'
entrypoint: 'npm'
args: ["test"]
tags: ['cloud-builders-community']
images: ['gcr.io/$PROJECT_ID/npm']
tags: ['cloud-builders-community']