-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to system image base management
This just a checkpoint along the way to, pushing a properly structured base image that we will pull and use in later work. * Tweak build-base.sh to output a normal `docker export` tarball. * Add bazel targets to help with pushing the base image. * Add a noci tag that can be used to skip rules. * Exclude noci-tagged targets in xtask bazel build and bazel test Change-Id: Ib91687dad80a9d179b730fd0c47d05a6d744c6ad
- Loading branch information
Showing
4 changed files
with
93 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# | ||
# Copyright 2024 The Project Oak Authors | ||
# | ||
# 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. | ||
# | ||
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_push") | ||
|
||
package( | ||
licenses = ["notice"], | ||
) | ||
|
||
### Base Image Update Targets | ||
### These can't yet be run automatically. First, the build-base.sh script must be run. | ||
|
||
# This can be generated by running build-base.sh | ||
filegroup( | ||
name = "base_image_tar", | ||
srcs = [ | ||
"target/base-image.tar", | ||
], | ||
# This rule will fail until build-base.sh has been run | ||
tags = ["noci"], | ||
) | ||
|
||
oci_image( | ||
name = "oak_containers_sysimage_base", | ||
architecture = "amd64", | ||
os = "linux", | ||
# This rule will fail until build-base.sh has been run | ||
tags = ["noci"], | ||
tars = [":base_image_tar"], | ||
) | ||
|
||
# After running this target, you will need to update the hash for | ||
# oak_containers_sysimage_base in the WORKSPACE file to use it. | ||
oci_push( | ||
name = "push_base", | ||
image = ":oak_containers_sysimage_base", | ||
remote_tags = ["latest"], | ||
repository = "europe-west2-docker.pkg.dev/oak-ci/oak-containers-sysimage-base/oak-containers-sysimage-base", | ||
# This rule will fail until build-base.sh has been run | ||
tags = ["noci"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters