blob: 04a7ea6ce083f1321a8b4768e6f6b1c0b4aa17ff [file] [log] [blame]
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an AS IS BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
substitutions:
'_TEST': 'install_packages_remote_pkgspec_test'
'_INPUT_IMAGE': 'cos-85-13310-1260-8'
'_INPUT_PROJECT': 'cos-cloud'
'_INPUT_PKGSPEC_FILE': 'kubernetes_pkg_spec.tar.gz'
'_INPUT_PKGSPEC': 'testing/install_packages_remote_pkgspec_test/kubernetes_pkg_spec.tar.gz'
steps:
- name: 'gcr.io/cloud-builders/bazel'
args: ['run', '--spawn_strategy=standalone', ':cos_customizer', '--', '--norun']
- name: 'gcr.io/cloud-builders/gsutil'
args: [ "-m", "cp", "${_INPUT_PKGSPEC}", "gs://${PROJECT_ID}_cloudbuild/" ]
- name: 'bazel:cos_customizer'
args: ['start-image-build',
'-build-context=testing/${_TEST}',
'-image-name=${_INPUT_IMAGE}',
'-image-project=${_INPUT_PROJECT}',
'-gcs-bucket=${PROJECT_ID}_cloudbuild',
'-gcs-workdir=customizer-$BUILD_ID']
- name: 'bazel:cos_customizer'
args: ['anthos-installer-install',
'-pkgspec-url=gs://${PROJECT_ID}_cloudbuild/${_INPUT_PKGSPEC_FILE}']
- name: 'bazel:cos_customizer'
args: ['finish-image-build',
'-zone=us-west1-b',
'-project=$PROJECT_ID',
'-image-name=preload-test-$BUILD_ID',
'-image-project=$PROJECT_ID',
'-timeout=5m']
- name: 'gcr.io/compute-image-tools/daisy'
args: ["-project=$PROJECT_ID", "-zone=us-west1-b", "-var:image_name",
"preload-test-$BUILD_ID", "-var:image_project", "$PROJECT_ID",
"-var:test_cfg", "../${_TEST}/preload_test.cfg", "testing/util/run_test.wf.json"]
- name: 'gcr.io/cloud-builders/gsutil'
args: ["rm", "gs://${PROJECT_ID}_cloudbuild/kubernetes_pkg_spec.tar.gz" ]
options:
machineType: 'N1_HIGHCPU_32'
timeout: '7200s'