2022-10-04 16:32:35 +00:00
|
|
|
# Copyright 2022 The ChromiumOS Authors
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
steps:
|
|
|
|
# insecure builder required due to cros_sdk can only run in a privileged container
|
|
|
|
- name: 'gcr.io/cloud-builders/docker'
|
|
|
|
args: [ 'buildx', 'create', '--use', '--name', 'insecure-builder', '--buildkitd-flags', '--allow-insecure-entitlement security.insecure']
|
|
|
|
- name: 'gcr.io/cloud-builders/docker'
|
2022-10-19 22:25:57 +00:00
|
|
|
args: [ 'buildx', 'build', '-t', 'gcr.io/crosvm-infra-experimental/crosvm_cros_cloudbuild', '--cache-to=type=local,dest=/docker_cache', '--allow', 'security.insecure', '.' ]
|
|
|
|
# docker push is separated out because of https://github.com/docker/buildx/issues/1205
|
2022-10-04 16:32:35 +00:00
|
|
|
- name: 'gcr.io/cloud-builders/docker'
|
|
|
|
args: [ 'buildx', 'stop', 'insecure-builder']
|
|
|
|
- name: 'gcr.io/cloud-builders/docker'
|
2022-10-19 22:25:57 +00:00
|
|
|
args: [ 'buildx', 'build', '-t', 'gcr.io/crosvm-infra-experimental/crosvm_cros_cloudbuild', '--cache-from=type=local,src=/docker_cache', '--push', '--allow', 'security.insecure', '.' ]
|
2022-10-04 16:32:35 +00:00
|
|
|
timeout: 30000s
|
|
|
|
options:
|
|
|
|
machineType: 'E2_HIGHCPU_32'
|
2022-10-19 22:25:57 +00:00
|
|
|
diskSizeGb: '1000'
|
|
|
|
volumes:
|
|
|
|
- name: 'docker_cache'
|
|
|
|
path: '/docker_cache'
|