# See https://cloud.google.com/cloud-build/docs/build-config options: dynamic_substitutions: true substitution_option: ALLOW_LOOSE machineType: 'N1_HIGHCPU_8' steps: - name: gcr.io/cloud-builders/git args: ['fetch', '--tags'] - name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20221214-1b4dd4d69a' entrypoint: /buildx-entrypoint args: - build - --tag=gcr.io/$PROJECT_ID/cloud-controller-manager:$_SHORT_TAG - --tag=gcr.io/$PROJECT_ID/cloud-controller-manager:latest - --build-arg=VERSION=$_SHORT_TAG - --output=type=registry - --platform=linux/amd64,linux/arm64 - . # Build cloudbuild artifacts (for attestation) - name: 'docker.io/library/golang:1.22.4-bookworm' id: cloudbuild-artifacts entrypoint: make env: - PULL_BASE_REF=$_PULL_BASE_REF - LATEST_FILE=markers/${_PULL_BASE_REF}/latest-tag.txt args: - cloudbuild-artifacts substitutions: _GIT_TAG: 'v99999999-v12345' # Remove date prefix (first 10 characters) to create valid semver version: # v20220510-v1.24.0-alpha.0-15-g09bd268 => v1.24.0-alpha.0-15-g09bd268 _SHORT_TAG: '${_GIT_TAG:10}' timeout: 1200s