-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
running cmrel does not require to be in the release repo folder anymore
The flag --cloudbuild was thus removed. Signed-off-by: Maël Valais <[email protected]>
- Loading branch information
Showing
5 changed files
with
166 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
timeout: 14400s | ||
|
||
#### SECURITY NOTICE #### | ||
# Google Cloud Build (GCB) supports the usage of secrets for build requests. | ||
# Secrets appear within GCB configs as base64-encoded strings. | ||
# These secrets are GCP Cloud KMS-encrypted and cannot be decrypted by any human or system | ||
# outside of GCP Cloud KMS for the GCP project this encrypted resource was created for. | ||
# Seeing the base64-encoded encrypted blob here is not a security event for the project. | ||
# | ||
# More details on using encrypted resources on Google Cloud Build can be found here: | ||
# https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-secrets-credentials | ||
# | ||
# (Please do not remove this security notice.) | ||
secrets: | ||
- kmsKeyName: projects/cert-manager-release/locations/europe-west1/keyRings/cert-manager-release/cryptoKeys/cert-manager-release-secret-key | ||
secretEnv: | ||
GITHUB_TOKEN: CiQAPjqeE0LnlyMJdmLr+laf8RxSKjw/BOv8yiTzdi/RjN9IWh4SUQBQ4fbHZMFt3QlDxBvdU81a6r5LXT0pTTXWOuHQbctSsjc2BZCMROgI2wdRCEyTgj5XJ1YQS0kXaEfIucZrhUlMKsJPXt4ZaZkKtxv4RNPpQg== | ||
DOCKER_CONFIG: CiQAPjqeEyZx+aSgFNoW7KQ4wE4hp/9vbWElifjHJNTI0/71ywMSkwIAUOH2xwTfrn72i6p+Op2PYnjDfwMBcInMEtgKAqiTsaup3R5HeL8BsZGuWxVhCEm5CJJ0Rg3CPdFUx2IVmCfC3j32LkAiMxMpszdHTjWHEyWmxwtBlTJW8NFmoYzxfN4Ox9rYFF66eZ0XVdLz1UejXpqAkGFVzTzQSu4rvNFnAsP5Sj7ZKJpXn+p0ZZW1IdMTD0xzCwZjW9hhcTjyNaCKDJYwl8j6Y/bYeoUMrzDQNk48fzKIBgxEdUTR2OOAI785GWSrkB4Y03oEyrfw8jTd1yAoil2S6p3AGV1FbvFleajSCy3Ov+5gjomjtqCbTx06hVsTcqLHC45WzAWPa/8TsiXh5PPgBbkg+pfBQUTj6i9+WA== | ||
|
||
steps: | ||
|
||
## Clone & checkout the cert-manager release repository | ||
- name: gcr.io/cloud-builders/go:alpine-1.16 | ||
dir: "go/src/github.com/cert-manager/release" | ||
entrypoint: sh | ||
args: | ||
- -c | ||
- | | ||
set -e | ||
git clone "${_RELEASE_REPO_URL}" . && git checkout "${_RELEASE_REPO_REF}" | ||
CGO_ENABLED=0 go build -o /workspace/go/bin/cmrel ./cmd/cmrel | ||
## Write DOCKER_CONFIG file to $HOME/.docker/config.json | ||
- name: gcr.io/cloud-builders/docker:19.03.8 | ||
entrypoint: bash | ||
secretEnv: | ||
- DOCKER_CONFIG | ||
args: | ||
- -c | ||
- | | ||
mkdir -p $$HOME/.docker | ||
echo "$${DOCKER_CONFIG}" > $$HOME/.docker/config.json | ||
## Build and push the release artifacts | ||
- name: gcr.io/cloud-builders/docker:19.03.8 | ||
dir: "go/src/github.com/jetstack/cert-manager" | ||
entrypoint: /workspace/go/bin/cmrel | ||
secretEnv: | ||
- GITHUB_TOKEN | ||
args: | ||
- gcb | ||
- publish | ||
- --bucket=${_RELEASE_BUCKET} | ||
- --release-name=${_RELEASE_NAME} | ||
- --nomock=${_NO_MOCK} | ||
- --published-github-org=${_PUBLISHED_GITHUB_ORG} | ||
- --published-github-repo=${_PUBLISHED_GITHUB_REPO} | ||
- --published-helm-chart-github-owner=${_PUBLISHED_HELM_CHART_GITHUB_OWNER} | ||
- --published-helm-chart-github-repo=${_PUBLISHED_HELM_CHART_GITHUB_REPO} | ||
- --published-helm-chart-github-branch=${_PUBLISHED_HELM_CHART_GITHUB_BRANCH} | ||
- --published-image-repo=${_PUBLISHED_IMAGE_REPO} | ||
|
||
tags: | ||
- "cert-manager-release-publish" | ||
- "name-${_TAG_RELEASE_NAME}" | ||
|
||
# Use the --substitutions=_OS=linux,_ARCH=arm64 flag to gcloud build submit to | ||
# override these values | ||
substitutions: | ||
## Required parameters | ||
_RELEASE_NAME: "" | ||
## Optional/defaulted parameters | ||
_RELEASE_BUCKET: "" | ||
## Options controlling the version of the release tooling used in the build. | ||
_RELEASE_REPO_URL: https://github.com/cert-manager/release.git | ||
_RELEASE_REPO_REF: "master" | ||
_NO_MOCK: "false" | ||
_PUBLISHED_GITHUB_ORG: "" | ||
_PUBLISHED_GITHUB_REPO: "" | ||
_PUBLISHED_HELM_CHART_GITHUB_OWNER: "" | ||
_PUBLISHED_HELM_CHART_GITHUB_REPO: "" | ||
_PUBLISHED_HELM_CHART_GITHUB_BRANCH: "" | ||
_PUBLISHED_IMAGE_REPO: "" | ||
## Used as a tag to identify the build more easily later | ||
_TAG_RELEASE_NAME: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
timeout: 14400s | ||
|
||
steps: | ||
|
||
## Clone & checkout the cert-manager repository | ||
- name: gcr.io/cloud-builders/git | ||
dir: "go/src/github.com/jetstack/cert-manager" | ||
entrypoint: bash | ||
args: | ||
- -c | ||
- | | ||
set -e | ||
git clone "${_CM_REPO}" . && git checkout "${_CM_REF}" | ||
## Clone & checkout the cert-manager release repository | ||
- name: gcr.io/cloud-builders/go:alpine-1.16 | ||
dir: "go/src/github.com/cert-manager/release" | ||
entrypoint: sh | ||
args: | ||
- -c | ||
- | | ||
set -e | ||
git clone "${_RELEASE_REPO_URL}" . && git checkout "${_RELEASE_REPO_REF}" | ||
CGO_ENABLED=0 go build -o /workspace/go/bin/cmrel ./cmd/cmrel | ||
## Build and push the release artifacts | ||
- name: 'l.gcr.io/google/bazel:${_BAZEL_VERSION}' | ||
dir: "go/src/github.com/jetstack/cert-manager" | ||
entrypoint: /workspace/go/bin/cmrel | ||
args: | ||
- gcb | ||
- stage | ||
- --repo-path=. | ||
- --release-version=${_RELEASE_VERSION} | ||
- --published-image-repo=${_PUBLISHED_IMAGE_REPO} | ||
- --bucket=${_RELEASE_BUCKET} | ||
|
||
tags: | ||
- "cert-manager-release-stage" | ||
- "bazel-${_BAZEL_VERSION}" | ||
- "ref-${_CM_REF}" | ||
- "branch-${_TAG_RELEASE_BRANCH}" | ||
|
||
# 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/jetstack/cert-manager.git | ||
_RELEASE_VERSION: "" | ||
_RELEASE_BUCKET: "" | ||
_PUBLISHED_IMAGE_REPO: quay.io/jetstack | ||
_BAZEL_VERSION: "3.5.0" | ||
## Options controlling the version of the release tooling used in the build. | ||
_RELEASE_REPO_URL: https://github.com/cert-manager/release.git | ||
_RELEASE_REPO_REF: "master" | ||
## Used as a tag to identify the build more easily later | ||
_TAG_RELEASE_BRANCH: "" | ||
|
||
options: | ||
machineType: n1-highcpu-32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters