mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
dev_container: Add latest tag when pushing images
This will allow devcontainer.json files to always use the latest container without manually upreving the version. BUG=b:273529589 TEST=open dev container in vscode Change-Id: I71d58eb2936097bd81dfcc0872d362b2c6b9e388 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4341238 Commit-Queue: Dennis Kempin <denniskempin@google.com> Reviewed-by: Zihan Chen <zihanchen@google.com>
This commit is contained in:
parent
6abac76996
commit
20f0604494
3 changed files with 20 additions and 13 deletions
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
// TODO(b/273529589): Automatically use latest version
|
||||
"image": "gcr.io/crosvm-infra/crosvm_dev:r0037",
|
||||
"image": "gcr.io/crosvm-infra/crosvm_dev:latest",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
{
|
||||
"image": "gcr.io/crosvm-infra/crosvm_dev_user:r0032",
|
||||
"extensions": [
|
||||
"rust-lang.rust-analyzer",
|
||||
"bungcip.better-toml",
|
||||
"esbenp.prettier-vscode",
|
||||
"ms-python.vscode-pylance",
|
||||
"foxundermoon.shell-format",
|
||||
"timonwong.shellcheck",
|
||||
],
|
||||
"image": "gcr.io/crosvm-infra/crosvm_dev_user:latest",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"rust-lang.rust-analyzer",
|
||||
"bungcip.better-toml",
|
||||
"esbenp.prettier-vscode",
|
||||
"ms-python.vscode-pylance",
|
||||
"foxundermoon.shell-format",
|
||||
"timonwong.shellcheck"
|
||||
]
|
||||
}
|
||||
},
|
||||
"runArgs": [
|
||||
"--privileged",
|
||||
"--device=/dev/kvm",
|
||||
|
@ -16,9 +20,9 @@
|
|||
"--device=/dev/vhost-net",
|
||||
"--device=/dev/vhost-vsock",
|
||||
"--mount=type=tmpfs,destination=/tmp",
|
||||
"--mount=type=tmpfs,destination=/var/empty",
|
||||
"--mount=type=tmpfs,destination=/var/empty"
|
||||
],
|
||||
"containerUser": "crosvmdev",
|
||||
"updateContentCommand": "sudo chown -R --reference=/workspaces/crosvm /home/crosvmdev /cache /scratch",
|
||||
"postCreateCommand": "sudo chmod 666 /dev/kvm",
|
||||
"postCreateCommand": "sudo chmod 666 /dev/kvm"
|
||||
}
|
||||
|
|
|
@ -27,13 +27,16 @@ all: crosvm_dev crosvm_dev_user
|
|||
|
||||
upload: all
|
||||
$(DOCKER) push $(TAG_BASE)/crosvm_dev:$(VERSION)
|
||||
$(DOCKER) push $(TAG_BASE)/crosvm_dev:latest
|
||||
$(DOCKER) push $(TAG_BASE)/crosvm_dev_user:$(VERSION)
|
||||
$(DOCKER) push $(TAG_BASE)/crosvm_dev_user:latest
|
||||
|
||||
crosvm_dev:
|
||||
$(DOCKER) build \
|
||||
-t $(TAG_BASE)/$@:$(VERSION) \
|
||||
-f Dockerfile \
|
||||
$(BUILD_CONTEXT)
|
||||
$(DOCKER) tag $(TAG_BASE)/$@:$(VERSION) $(TAG_BASE)/$@:latest
|
||||
|
||||
crosvm_dev_user:
|
||||
$(DOCKER) build \
|
||||
|
@ -41,5 +44,6 @@ crosvm_dev_user:
|
|||
-f Dockerfile.user \
|
||||
--build-arg=VERSION=$(VERSION) \
|
||||
$(BUILD_CONTEXT)
|
||||
$(DOCKER) tag $(TAG_BASE)/$@:$(VERSION) $(TAG_BASE)/$@:latest
|
||||
|
||||
.PHONY: all crosvm_dev upload
|
||||
|
|
Loading…
Reference in a new issue