Skip to content
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
15 changes: 15 additions & 0 deletions cloudbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# See https://cloud.google.com/cloud-build/docs/build-config
options:
substitution_option: ALLOW_LOOSE
machineType: E2_HIGHCPU_32
steps:
- name: gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20250116-2a05ea7e3d
entrypoint: bash
env:
- DRIVER_IMAGE_REGISTRY=us-central1-docker.pkg.dev/k8s-staging-images/dra-example-driver
- DRIVER_IMAGE_TAG=$COMMIT_SHA
args:
- -ec
- |
demo/scripts/build-driver-image.sh
demo/scripts/push-driver-image.sh
31 changes: 31 additions & 0 deletions demo/scripts/push-driver-image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

# Copyright 2025 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# A reference to the current directory where this script is located
CURRENT_DIR="$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)"

set -ex
set -o pipefail

source "${CURRENT_DIR}/common.sh"

# Set build variables
export REGISTRY="${DRIVER_IMAGE_REGISTRY}"
export IMAGE="${DRIVER_IMAGE_NAME}"
export VERSION="${DRIVER_IMAGE_TAG}"
export CONTAINER_TOOL="${CONTAINER_TOOL}"

make -f deployments/container/Makefile push
3 changes: 3 additions & 0 deletions deployments/container/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ $(DISTRIBUTIONS):
--build-arg VERSION="$(VERSION)" \
-f $(DOCKERFILE) \
$(CURDIR)

push:
$(CONTAINER_TOOL) push $(IMAGE)
Loading