diff --git a/.aspect/workflows/config.yaml b/.aspect/workflows/config.yaml index 15e87e045..52a42b04f 100644 --- a/.aspect/workflows/config.yaml +++ b/.aspect/workflows/config.yaml @@ -10,5 +10,9 @@ tasks: - test: - delivery: always_deliver: true + bazel: + flags: + - --remote_download_outputs=toplevel branches: - main + - delivery_bwotb_test diff --git a/.circleci/config.yml b/.circleci/config.yml index 1fc618a52..b936ae442 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,7 @@ workflows: branches: only: - main + - delivery_bwotb_test - aspect-build/test-delivery requires: - aw-test @@ -398,6 +399,9 @@ jobs: - equal: - main - << pipeline.git.branch >> + - equal: + - delivery_bwotb_test + - << pipeline.git.branch >> - equal: - aspect-build/test-delivery - << pipeline.git.branch >> diff --git a/WORKSPACE b/WORKSPACE index c6d1b02c8..5439e14fd 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -256,3 +256,39 @@ fetch_terraform() load("//.aspect/workflows:deps.bzl", "fetch_workflows_deps") fetch_workflows_deps() + +http_archive( + name = "rules_oci", + sha256 = "58b7a175ee90c12583afeca388523adf6a4e5a0528f330b41c302b91a4d6fc06", + strip_prefix = "rules_oci-1.6.0", + url = "https://github.com/bazel-contrib/rules_oci/releases/download/v1.6.0/rules_oci-v1.6.0.tar.gz", +) + +load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies") + +rules_oci_dependencies() + +load("@rules_oci//oci:repositories.bzl", "LATEST_CRANE_VERSION", "oci_register_toolchains") + +oci_register_toolchains( + name = "oci", + crane_version = LATEST_CRANE_VERSION, +) + +load("@rules_oci//oci:pull.bzl", "oci_pull") + +oci_pull( + name = "debian", + digest = "sha256:3d868b5eb908155f3784317b3dda2941df87bbbbaa4608f84881de66d9bb297b", + image = "debian", + platforms = [ + "linux/386", + "linux/amd64", + "linux/arm/v5", + "linux/arm/v7", + "linux/arm64/v8", + "linux/mips64le", + "linux/ppc64le", + "linux/s390x", + ], +) diff --git a/release/BUILD.bazel b/release/BUILD.bazel index 82d0ea78d..19d0b2b82 100644 --- a/release/BUILD.bazel +++ b/release/BUILD.bazel @@ -1,4 +1,5 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load("@rules_oci//oci:defs.bzl", "oci_image", "oci_push") load(":bazelisk_artifacts.bzl", "bazelisk_artifacts") load(":cli_brew_artifacts.bzl", "cli_brew_artifacts") load(":release.bzl", "multi_platform_binaries", "release") @@ -103,3 +104,18 @@ sh_binary( ], tags = ["deliverable"], ) + +oci_image( + name = "image", + base = "@debian", + entrypoint = ["bash"], + tars = [], + visibility = ["//visibility:public"], +) + +oci_push( + name = "push_image", + image = ":image", + repository = "111111111111.dkr.ecr.us-west-2.amazonaws.com/foo/bar", + tags = ["deliverable"], +)