Skip to content
Open
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
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
7.4.1
7.5.0

# The first line of this file is used by Bazelisk and Bazel to be sure
# the right version of Bazel is used to build and test this repo.
Expand Down
1 change: 1 addition & 0 deletions .bcr/source.template.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"integrity": "**leave this alone**",
"strip_prefix": "{REPO}-{VERSION}",
"docs_url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/rules_oci-{TAG}.docs.tar.gz",
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/rules_oci-{TAG}.tar.gz"
}
8 changes: 8 additions & 0 deletions .github/workflows/release_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ ARCHIVE="rules_oci-$TAG.tar.gz"
git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip > $ARCHIVE
SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}')

# Add generated API docs to the release, see https://github.com/bazelbuild/bazel-central-registry/issues/5593
docs="$(mktemp -d)"; targets="$(mktemp)"
bazel --output_base="$docs" query --output=label --output_file="$targets" 'kind("starlark_doc_extract rule", //...)'
bazel --output_base="$docs" build --target_pattern_file="$targets" --remote_download_regex='.*doc_extract\.binaryproto'
tar --create --auto-compress \
--directory "$(bazel --output_base="$docs" info bazel-bin)" \
--file "$GITHUB_WORKSPACE/${ARCHIVE%.tar.gz}.docs.tar.gz" .

cat << EOF
## Using bzlmod with Bazel 6 or later:

Expand Down
2 changes: 2 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ gazelle_binary(
)

# gazelle:exclude examples/**
# gazelle:exclude fetch.bzl
# gazelle:map_kind bzl_library bzl_library @bazel_lib//:bzl_library.bzl
gazelle(
name = "gazelle",
gazelle = "gazelle_bin",
Expand Down
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module(
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.2")
bazel_dep(name = "bazel_lib", version = "3.0.0-beta.1")
bazel_dep(name = "bazel_features", version = "1.10.0")
bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "platforms", version = "0.0.8")
Expand Down
2 changes: 1 addition & 1 deletion cosign/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@bazel_lib//:bzl_library.bzl", "bzl_library")

toolchain_type(
name = "toolchain_type",
Expand Down
20 changes: 7 additions & 13 deletions cosign/private/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@bazel_lib//:bzl_library.bzl", "bzl_library")

exports_files(
glob(["*.bzl"]),
Expand All @@ -11,21 +11,15 @@ exports_files([
])

bzl_library(
name = "sign",
srcs = ["sign.bzl"],
visibility = [
"//cosign:__subpackages__",
"//docs:__pkg__",
],
name = "attest",
srcs = ["attest.bzl"],
visibility = ["//cosign:__subpackages__"],
)

bzl_library(
name = "attest",
srcs = ["attest.bzl"],
visibility = [
"//cosign:__subpackages__",
"//docs:__pkg__",
],
name = "sign",
srcs = ["sign.bzl"],
visibility = ["//cosign:__subpackages__"],
)

bzl_library(
Expand Down
4 changes: 4 additions & 0 deletions docs/image.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions docs/image_index.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/load.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/pull.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions docs/push.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion oci/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@aspect_bazel_lib//lib:utils.bzl", bazel_lib_utils = "utils")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@bazel_lib//:bzl_library.bzl", "bzl_library")

Comment on lines 1 to 3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Add bazel_lib to workspace dependencies

The change replaces all bzl_library loads with @bazel_lib//:bzl_library.bzl (see this file), yet rules_oci_dependencies()—which non‑bzlmod users are instructed to call from WORKSPACE—still only declares bazel_skylib and never creates a bazel_lib repository. Any workspace integration will now fail with no such package '@bazel_lib//...'. An http_archive for bazel_lib should be added alongside the existing dependencies to keep legacy setups working.

Useful? React with 👍 / 👎.

exports_files(
glob(["*.bzl"]),
Expand Down
47 changes: 22 additions & 25 deletions oci/private/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@bazel_lib//:bzl_library.bzl", "bzl_library")

exports_files(
glob(["*.bzl"]),
Expand Down Expand Up @@ -37,15 +37,6 @@ bzl_library(
],
)

bzl_library(
name = "image_index",
srcs = ["image_index.bzl"],
visibility = [
"//docs:__pkg__",
"//oci:__subpackages__",
],
)

bzl_library(
name = "pull",
srcs = ["pull.bzl"],
Expand All @@ -72,21 +63,6 @@ bzl_library(
],
)

bzl_library(
name = "toolchains_repo",
srcs = ["toolchains_repo.bzl"],
visibility = [
"//cosign:__subpackages__",
"//oci:__subpackages__",
],
)

bzl_library(
name = "versions",
srcs = ["versions.bzl"],
visibility = ["//oci:__subpackages__"],
)

bzl_library(
name = "authn",
srcs = ["authn.bzl"],
Expand All @@ -107,3 +83,24 @@ bzl_library(
"@bazel_skylib//lib:versions",
],
)

bzl_library(
name = "image_index",
srcs = ["image_index.bzl"],
visibility = ["//oci:__subpackages__"],
)

bzl_library(
name = "toolchains_repo",
srcs = ["toolchains_repo.bzl"],
visibility = [
"//cosign:__subpackages__",
"//oci:__subpackages__",
],
)

bzl_library(
name = "versions",
srcs = ["versions.bzl"],
visibility = ["//oci:__subpackages__"],
)
Loading