mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
1f0b985a4d
See go/crosvm/infra for instructions on how to get access to uploading them. Added a helper script to install dependencies needed to build the guest_under_test. BUG=b:235269312 TEST=Kokoro Change-Id: I78387a33ddbf3ab199b36e76ba617acb1250c7e5 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3783011 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Dennis Kempin <denniskempin@google.com> Tested-by: Dennis Kempin <denniskempin@google.com>
39 lines
1 KiB
Makefile
39 lines
1 KiB
Makefile
# Copyright 2021 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
#
|
|
# To locally build the docker container for usage with dev_container:
|
|
#
|
|
# make -C tools/impl/dev_container crosvm_dev
|
|
#
|
|
# To upload a new version of the container, uprev the `version` file and run;
|
|
#
|
|
# make -C tools/impl/dev_container upload
|
|
#
|
|
# You need to be a Googler to be able to do so. See go/crosvm/infra for access control and
|
|
# authenticate via:
|
|
#
|
|
# gcloud auth configure-docker gcr.io
|
|
|
|
export DOCKER_BUILDKIT=1
|
|
|
|
TAG_BASE=gcr.io/crosvm-infra
|
|
VERSION=$(shell cat version)
|
|
RUST_VERSION=$(shell cat ../../../rust-toolchain | grep channel | grep -E -o "[0-9\.]+")
|
|
BUILD_CONTEXT=$(shell realpath ../../../)
|
|
|
|
DOCKER ?= docker
|
|
|
|
all: crosvm_dev
|
|
|
|
upload: all
|
|
$(DOCKER) push $(TAG_BASE)/crosvm_dev:$(VERSION)
|
|
|
|
crosvm_dev:
|
|
$(DOCKER) build \
|
|
--build-arg RUST_VERSION=$(RUST_VERSION) \
|
|
-t $(TAG_BASE)/$@:$(VERSION) \
|
|
-f Dockerfile \
|
|
$(BUILD_CONTEXT)
|
|
|
|
.PHONY: all crosvm_dev upload
|