crosvm/tools/impl/cros_container/fresh/cloudbuild.yaml

19 lines
927 B
YAML
Raw Normal View History

# 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'
args: [ 'buildx', 'build', '-t', 'gcr.io/crosvm-infra-experimental/crosvm_cros_cloudbuild', '--allow', 'security.insecure', '.' ]
- name: 'gcr.io/cloud-builders/docker'
args: [ 'buildx', 'stop', 'insecure-builder']
- name: 'gcr.io/cloud-builders/docker'
args: [ 'buildx', 'build', '-t', 'gcr.io/crosvm-infra-experimental/crosvm_cros_cloudbuild', '--push', '--allow', 'security.insecure', '.' ]
timeout: 30000s
options:
machineType: 'E2_HIGHCPU_32'
diskSizeGb: '500'