Skip to content

Commit

Permalink
initial commit: it times out
Browse files Browse the repository at this point in the history
  • Loading branch information
theneva committed Feb 15, 2023
0 parents commit 48856f3
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
10 changes: 10 additions & 0 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:16.19.0-alpine3.17

WORKDIR /app

RUN npm i @google-cloud/storage
RUN npm ls gcp-metadata

COPY index.js .

CMD ["node", "index.js"]
7 changes: 7 additions & 0 deletions app/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { Storage } = require('@google-cloud/storage');

// Log the names of the first 5 buckets in the response
new Storage().getBuckets().then(response => {
const buckets = response[0];
return buckets.slice(0, 5).map(bucket => bucket.name);
}).then(console.log, console.error);
16 changes: 16 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
timeout: 60s
steps:
- id: Build app image
name: gcr.io/cloud-builders/docker
dir: app
args:
- build
- '-t'
- testing-app
- .
- id: Start app for testing
name: gcr.io/cloud-builders/docker
args:
- run
- '--rm'
- testing-app

0 comments on commit 48856f3

Please sign in to comment.