forked from googlearchive/pubsubbeat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
executable file
·38 lines (30 loc) · 1.1 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
steps:
# - name: google/cloud-sdk
# args: ["/bin/bash", "-c", "date; if gsutil ls gs://debezium-maven-repo/$REPO_NAME/repository; then mkdir -p ./_m2/; gsutil -m cp -R gs://debezium-maven-repo/$REPO_NAME/repository ./_m2/; fi && date" ]
- name: "eu.gcr.io/fnz-poa-development/golang:latest"
entrypoint: "/bin/sh"
args:
- "-c"
- |
set -x
set -e
set -o pipefail
date
echo build release version
make
date
timeout: "2400s"
- id: Build docker image
name: 'gcr.io/cloud-builders/docker'
args: [ 'build', '-t', 'eu.gcr.io/$PROJECT_ID/pubsubbeat:latest', '.' ]
- id: Delete untagged images
name: gcr.io/cloud-builders/gcloud
entrypoint: sh
args:
- -c
- |
export IMAGE=pubsubbeat
gcloud container images list-tags eu.gcr.io/${PROJECT_ID}/$${IMAGE} --filter='-tags:*' --format='get(digest)' --limit=unlimited| xargs -r -I {arg} gcloud container images delete --quiet "eu.gcr.io/${PROJECT_ID}/$${IMAGE}@{arg}"
images:
- 'eu.gcr.io/$PROJECT_ID/pubsubbeat:latest'
timeout: "2400s"