Skip to content

Commit b726215

Browse files
authored
Add a cloudbuild.yaml trigger for container-diff releases. (GoogleContainerTools#125)
1 parent 4ceba80 commit b726215

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Dockerfile.build

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Dockerfile used to build a build step that builds container-diff in CI.
2+
FROM golang:1.9
3+
RUN apt-get update && apt-get install make
4+
RUN mkdir -p /go/src/github.com/GoogleCloudPlatform/
5+
RUN ln -s /workspace /go/src/github.com/GoogleCloudPlatform/container-diff
6+
WORKDIR /go/src/github.com/GoogleCloudPlatform/container-diff

cloudbuild.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
steps:
2+
# Build the container that will do the go build.
3+
- name: 'gcr.io/cloud-builders/docker'
4+
args: ['build', '-t', 'builder', '-f', 'Dockerfile.build', '.']
5+
# Do the go build.
6+
- name: 'builder'
7+
args: ['make', 'cross']
8+
# Upload to GCS.
9+
- name: 'gcr.io/cloud-builders/gsutil'
10+
args: ['cp', '-r', 'out/*', 'gs://container-diff/builds/$COMMIT_SHA/']

0 commit comments

Comments
 (0)