-
Notifications
You must be signed in to change notification settings - Fork 12
/
cloudbuild.yaml
74 lines (66 loc) · 2.19 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
timeout: 14400s
steps:
## Clone & checkout the cert-manager repository
- name: gcr.io/cloud-builders/git
dir: "go/src/github.com/cert-manager/cert-manager"
entrypoint: bash
args:
- -c
- |
set -e
git clone "${_CM_REPO}" . && git checkout "${_CM_REF}"
steps:
- name: docker.io/library/golang:1.22-alpine
entrypoint: go
args:
- install
- github.com/cert-manager/release/cmd/cmrel@${_RELEASE_REPO_REF}
## Build and push the release artifacts
- name: 'gcr.io/cloud-builders/bazel@${_BAZEL_IMAGE_SHA}'
dir: "go/src/github.com/cert-manager/cert-manager"
entrypoint: /go/bin/cmrel
args:
- gcb
- stage
- --repo-path=.
- --release-version=${_RELEASE_VERSION}
- --published-image-repo=${_PUBLISHED_IMAGE_REPO}
- --bucket=${_RELEASE_BUCKET}
- --signing-kms-key=${_KMS_KEY}
- --skip-signing=${_SKIP_SIGNING}
- --target-os=${_TARGET_OSES}
- --target-arch=${_TARGET_ARCHES}
tags:
- "cert-manager-release-stage"
- "bazel-${_BAZEL_VERSION}"
- "ref-${_CM_REF}"
- "branch-${_TAG_RELEASE_BRANCH}"
options:
volumes:
- name: go-modules
path: /go
# Use the --substitutions=_OS=linux,_ARCH=arm64 flag to gcloud build submit to
# override these values
substitutions:
## Required parameters
_CM_REF: ""
## Optional/defaulted parameters
_CM_REPO: https://github.com/cert-manager/cert-manager.git
_RELEASE_VERSION: ""
_RELEASE_BUCKET: ""
_PUBLISHED_IMAGE_REPO: quay.io/jetstack
_KMS_KEY: "projects/cert-manager-release/locations/europe-west1/keyRings/cert-manager-release/cryptoKeys/cert-manager-release-signing-key/cryptoKeyVersions/1"
_SKIP_SIGNING: "false"
# gcr.io/cloud-builders/bazel does not have tagged images only image digests,
# so we have to manually find an image with the desired version.
_BAZEL_VERSION: 4.2.1
_BAZEL_IMAGE_SHA: "sha256:9950b67658ab659f6efbe39f64e202f6f5bb15f7934b203f6132018410758d0c"
## Options controlling which OSes and arches to build for where * means "all known"
_TARGET_OSES: "*"
_TARGET_ARCHES: "*"
## Options controlling the version of the release tooling used in the build.
_RELEASE_REPO_REF: "master"
## Used as a tag to identify the build more easily later
_TAG_RELEASE_BRANCH: ""
options:
machineType: n1-highcpu-32