Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k8s-ci-builder/releng-ci/kubepkg: add a REGISTRY substitution to allow registry selection #1953

Merged
merged 3 commits into from
Mar 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions cloudbuild-kubepkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,23 @@ steps:
- build
- -f
- ./Dockerfile-kubepkg
- --tag=gcr.io/$PROJECT_ID/kubepkg:$_GIT_TAG
- --tag=gcr.io/$PROJECT_ID/kubepkg:latest
- --tag=$_REGISTRY/kubepkg:$_GIT_TAG
- --tag=$_REGISTRY/kubepkg:latest
- .
- name: gcr.io/cloud-builders/docker
args:
- build
- -f
- ./Dockerfile-kubepkg-rpm
- --tag=gcr.io/$PROJECT_ID/kubepkg-rpm:$_GIT_TAG
- --tag=gcr.io/$PROJECT_ID/kubepkg-rpm:latest
- --tag=$_REGISTRY/kubepkg-rpm:$_GIT_TAG
- --tag=$_REGISTRY/kubepkg-rpm:latest
- .
substitutions:
# _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and
# can be used as a substitution
_GIT_TAG: '12345'
_PULL_BASE_REF: 'dev'
_REGISTRY: 'fake.repository/registry-name'
images:
- 'gcr.io/$PROJECT_ID/kubepkg:$_GIT_TAG'
- 'gcr.io/$PROJECT_ID/kubepkg:latest'
Expand Down
9 changes: 5 additions & 4 deletions images/releng/ci/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ steps:
dir: ./images/releng/ci
args:
- build
- --tag=gcr.io/$PROJECT_ID/releng-ci:$_GIT_TAG
- --tag=gcr.io/$PROJECT_ID/releng-ci:$_IMAGE_VERSION
- --tag=gcr.io/$PROJECT_ID/releng-ci:latest
- --tag=$_REGISTRY/releng-ci:$_GIT_TAG
- --tag=$_REGISTRY/releng-ci:$_IMAGE_VERSION
- --tag=$_REGISTRY/releng-ci:latest
- --build-arg=GO_VERSION=${_GO_VERSION}
- .
- name: gcr.io/gcp-runtimes/container-structure-test
dir: ./images/releng/ci
args:
- test
- --image=gcr.io/$PROJECT_ID/releng-ci:latest
- --image=$_REGISTRY/releng-ci:latest
- --config=test.yaml
substitutions:
# _GIT_TAG will be filled with a git-based tag for the image, of the form
Expand All @@ -26,6 +26,7 @@ substitutions:
_PULL_BASE_REF: 'dev'
_IMAGE_VERSION: 'v0.5.0'
_GO_VERSION: '1.16.1'
_REGISTRY: 'fake.repository/registry-name'
images:
- 'gcr.io/$PROJECT_ID/releng-ci:${_GIT_TAG}'
- 'gcr.io/$PROJECT_ID/releng-ci:${_IMAGE_VERSION}'
Expand Down
5 changes: 3 additions & 2 deletions images/releng/k8s-ci-builder/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ steps:
dir: ./images/releng/k8s-ci-builder
env:
- DOCKER_CLI_EXPERIMENTAL=enabled
- REGISTRY=gcr.io/$PROJECT_ID
- REGISTRY=$_REGISTRY
- IMAGE_ARG='$_REGISTRY/k8s-ci-builder:${_GIT_TAG}-${_CONFIG}'
- HOME=/root
- TAG=${_GIT_TAG}
- PULL_BASE_REF=${_PULL_BASE_REF}
- CONFIG=${_CONFIG}
- GO_VERSION=${_GO_VERSION}
- BAZEL_VERSION=${_BAZEL_VERSION}
- OLD_BAZEL_VERSION=${_OLD_BAZEL_VERSION}
- IMAGE_ARG='gcr.io/$PROJECT_ID/k8s-ci-builder:${_GIT_TAG}-${_CONFIG}'
- SKOPEO_VERSION=${_SKOPEO_VERSION}
args:
- '-c'
Expand All @@ -42,6 +42,7 @@ substitutions:
_BAZEL_VERSION: '0.0.0'
_OLD_BAZEL_VERSION: '0.0.0'
_SKOPEO_VERSION: 'v0.0.0'
_REGISTRY: 'fake.repository/registry-name'

tags:
- 'k8s-ci-builder'
Expand Down