Skip to content
Open
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
11 changes: 9 additions & 2 deletions common/cloudbuild-airlock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# GCB config for generating docker images using airlock.
#
# _IMAGE_NAME: Name of the image. E.g. python-multi
# _IMAGE_SOURCE_PATH: Path to Dockerfile. E.g. python/googleapis/python-multi
# _PROJECT_ID: Name of GCB project. E.g. cloud-sdk-release-custom-pool
# _REPO_NAME: Name of the Artifact Registry Repo. E.g. release-images-dev

timeout: 7200s # 2 hours
steps:
- name: 'gcr.io/cloud-builders/docker'
Expand All @@ -31,12 +38,12 @@ steps:
# https://docs.docker.com/build/builders/drivers/#loading-to-local-image-store
args: ["buildx", "build", "--add-host=metadata.google.internal:169.254.169.254",
"--load",
"-t", "us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME}", "."]
"-t", "us-central1-docker.pkg.dev/${_PROJECT_ID}/${_REPO_NAME}/${_IMAGE_NAME}", "."]
dir: '${_IMAGE_SOURCE_PATH}'
id: '${_IMAGE_NAME}'
waitFor: ["buildx-create"]
options:
machineType: 'E2_HIGHCPU_8'
requestedVerifyOption: VERIFIED # For provenance attestation generation
images:
- us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME}
- us-central1-docker.pkg.dev/${_PROJECT_ID}/${_REPO_NAME}/${_IMAGE_NAME}
9 changes: 5 additions & 4 deletions common/cloudbuild-structure-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,27 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# GCB config for generating docker images.
# GCB config for generating docker images and running structure_test.
#
# Parameters
# _IMAGE_NAME: Name of the image. E.g. python-multi
# _IMAGE_SOURCE_PATH: Path to Dockerfile. E.g. python/googleapis/python-multi
# _PROJECT_ID: Name of GCB project. E.g. cloud-sdk-release-custom-pool
# _REPO_NAME: Name of the Artifact Registry Repo. E.g. release-images-dev

timeout: 7200s # 2 hours
steps:
- name: gcr.io/cloud-builders/docker
args: [
'build', '-t',
'us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME}',
'us-central1-docker.pkg.dev/${_PROJECT_ID}/${_REPO_NAME}/${_IMAGE_NAME}',
'.']
dir: '${_IMAGE_SOURCE_PATH}'
id: '${_IMAGE_NAME}'
waitFor: ['-']
- name: gcr.io/gcp-runtimes/structure_test
args: [
"-i", "us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME}",
"-i", "us-central1-docker.pkg.dev/${_PROJECT_ID}/${_REPO_NAME}/${_IMAGE_NAME}",
"--config", "${_STRUCTURE_TEST_CONFIG}", "-v"]
waitFor: ["${_IMAGE_NAME}"]

Expand All @@ -40,4 +41,4 @@ options:
requestedVerifyOption: VERIFIED # For provenance attestation generation

images:
- us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME}
- us-central1-docker.pkg.dev/${_PROJECT_ID}/${_REPO_NAME}/${_IMAGE_NAME}
5 changes: 3 additions & 2 deletions common/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
# _IMAGE_NAME: Name of the image. E.g. python-multi
# _IMAGE_SOURCE_PATH: Path to Dockerfile. E.g. python/googleapis/python-multi
# _PROJECT_ID: Name of GCB project. E.g. cloud-sdk-release-custom-pool
# _REPO_NAME: Name of the Artifact Registry Repo. E.g. release-images-dev

timeout: 7200s # 2 hours
steps:
- name: gcr.io/cloud-builders/docker
args: [
'build', '-t',
'us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME}',
'us-central1-docker.pkg.dev/${_PROJECT_ID}/${_REPO_NAME}/${_IMAGE_NAME}',
'.']
dir: '${_IMAGE_SOURCE_PATH}'
id: '${_IMAGE_NAME}'
Expand All @@ -35,4 +36,4 @@ options:
requestedVerifyOption: VERIFIED # For provenance attestation generation

images:
- us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME}
- us-central1-docker.pkg.dev/${_PROJECT_ID}/${_REPO_NAME}/${_IMAGE_NAME}