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

Add cloudbuild config to build gcp-compute-persistent-disk-csi-driver image #724

Merged
merged 2 commits into from
Mar 16, 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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.13.4 as builder
FROM golang:1.13.15 as builder
WORKDIR /go/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver
ADD . .
RUN make
Expand All @@ -22,7 +22,7 @@ FROM k8s.gcr.io/build-image/debian-base-amd64:v2.1.3 as base
RUN clean-install udev

# Start from Kubernetes Debian base
FROM k8s.gcr.io/build-image/debian-base-amd64:v2.1.3
FROM k8s.gcr.io/build-image/debian-base-amd64:v2.1.3
COPY --from=builder /go/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/bin/gce-pd-csi-driver /gce-pd-csi-driver
# Install necessary dependencies
RUN clean-install util-linux e2fsprogs mount ca-certificates udev xfsprogs
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.Windows
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

ARG BASE_IMAGE
FROM --platform=$BUILDPLATFORM golang:1.13.4 AS builder
FROM --platform=$BUILDPLATFORM golang:1.13.15 AS builder

ARG TARGETPLATFORM
ARG BUILDPLATFORM
Expand Down
26 changes: 26 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# See https://cloud.google.com/cloud-build/docs/build-config
cpanato marked this conversation as resolved.
Show resolved Hide resolved
# For more information about Image pushing refer to https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md
timeout: 3600s

options:
substitution_option: ALLOW_LOOSE

steps:
- name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20201130-750d12f'
entrypoint: make
env:
- GCE_PD_CSI_STAGING_IMAGE=gcr.io/${_STAGING_PROJECT}/gcp-compute-persistent-disk-csi-driver
- GCE_PD_CSI_STAGING_VERSION=${_PULL_BASE_REF}
# default cloudbuild has HOME=/builder/home and docker buildx is in /root/.docker/cli-plugins/docker-buildx
# set the home to /root explicitly to if using docker buildx
- HOME=/root
args:
- build-and-push-multi-arch

substitutions:
_STAGING_PROJECT: 'k8s-staging-cloud-provider-gcp'
_PULL_BASE_REF: 'master'

tags:
- 'gcp-compute-persistent-disk-csi-driver'
- ${_PULL_BASE_REF}