forked from google/go-containerregistry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
53 lines (47 loc) · 1.97 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
steps:
# Build the ko binary.
- name: golang
env: ['GOPATH=/workspace/gopath']
entrypoint: go
args: ['get', 'github.com/google/ko/cmd/ko']
# Use the ko binary to build the crane and gcrane builder images.
- name: golang
env:
- 'GOPATH=/workspace/gopath'
- 'KO_DOCKER_REPO=gcr.io/$PROJECT_ID'
- 'GOFLAGS=-ldflags=-X=github.com/google/go-containerregistry/cmd/crane/cmd.Version=$COMMIT_SHA'
entrypoint: /workspace/gopath/bin/ko
dir: gopath/src
args: ['publish', '-B', 'github.com/google/go-containerregistry/cmd/crane', '-t', 'latest', '-t', '$COMMIT_SHA']
- name: golang
env:
- 'GOPATH=/workspace/gopath'
- 'KO_DOCKER_REPO=gcr.io/$PROJECT_ID'
- 'GOFLAGS=-ldflags=-X=github.com/google/go-containerregistry/cmd/crane/cmd.Version=$COMMIT_SHA'
entrypoint: /workspace/gopath/bin/ko
dir: gopath/src
args: ['publish', '-B', 'github.com/google/go-containerregistry/cmd/gcrane', '-t', 'latest', '-t', '$COMMIT_SHA']
# Use the ko binary to build the crane and gcrane builder *debug* images.
- name: golang
env:
- 'GOPATH=/workspace/gopath'
- 'KO_DOCKER_REPO=gcr.io/$PROJECT_ID'
- 'KO_CONFIG_PATH=/workspace/.ko/debug/'
- 'GOFLAGS=-ldflags=-X=github.com/google/go-containerregistry/cmd/crane/cmd.Version=$COMMIT_SHA'
entrypoint: /workspace/gopath/bin/ko
dir: gopath/src
args: ['publish', '-B', 'github.com/google/go-containerregistry/cmd/crane', '-t', 'debug']
- name: golang
env:
- 'GOPATH=/workspace/gopath'
- 'KO_DOCKER_REPO=gcr.io/$PROJECT_ID'
- 'KO_CONFIG_PATH=/workspace/.ko/debug/'
- 'GOFLAGS=-ldflags=-X=github.com/google/go-containerregistry/cmd/crane/cmd.Version=$COMMIT_SHA'
entrypoint: /workspace/gopath/bin/ko
dir: gopath/src
args: ['publish', '-B', 'github.com/google/go-containerregistry/cmd/gcrane', '-t', 'debug']
# Use the crane builder to get the digest for crane and gcrane.
- name: gcr.io/$PROJECT_ID/crane
args: ['digest', 'gcr.io/$PROJECT_ID/crane']
- name: gcr.io/$PROJECT_ID/crane
args: ['digest', 'gcr.io/$PROJECT_ID/gcrane']