Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Fix the Bazel integration test. #9604

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions integration/testdata/bazel-rules-oci/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
load("@rules_oci//oci:defs.bzl", "oci_tarball")
load("@rules_oci//oci:defs.bzl", "oci_load")

oci_tarball(
name = "hello.tar",
oci_load(
name = "hello",
image = "@hello//:hello",
repo_tags = ["hello:latest"],
)

filegroup(
name = "hello.tar",
srcs = [":hello"],
output_group = "tarball",
)
13 changes: 13 additions & 0 deletions integration/testdata/bazel-rules-oci/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
bazel_dep(name = "rules_oci", version = "2.0.1")

oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")

# Declare external images you need to pull, for example:
oci.pull(
name = "hello",
digest = "sha256:b510f29de2dfd80b88f7cd569db177a514117081bc8825eb64e423bd3db0fe64",
image = "us-docker.pkg.dev/google-samples/containers/gke/hello-app",
)

# For each oci.pull call, repeat the "name" here to expose them as dependencies.
use_repo(oci, "hello")
30 changes: 0 additions & 30 deletions integration/testdata/bazel-rules-oci/WORKSPACE

This file was deleted.

14 changes: 10 additions & 4 deletions integration/testdata/bazel-rules-oci/sub-dir/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
load("@rules_oci//oci:defs.bzl", "oci_tarball")
load("@rules_oci//oci:defs.bzl", "oci_load")

oci_tarball(
name = "hello.tar",
oci_load(
name = "hello",
image = "@hello//:hello",
repo_tags = ["hello-whatever:latest"],
repo_tags = ["hello:latest"],
)

filegroup(
name = "hello.tar",
srcs = [":hello"],
output_group = "tarball",
)
Loading