Skip to content
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
21 changes: 1 addition & 20 deletions .github/workflows/buildifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,5 @@ jobs:
go install github.com/bazelbuild/buildtools/buildifier@3.2.0

- name: Run buildifier
shell: bash
run: |
buildifier -mode=fix $(find . -name 'BUILD*' -o -name 'WORKSPACE*' -o -name '*.bzl' -type f)

- name: Verify buildifier
shell: bash
run: |
# From: https://backreference.org/2009/12/23/how-to-match-newlines-in-sed/
# This is to leverage this workaround:
# https://github.com/actions/toolkit/issues/193#issuecomment-605394935
function urlencode() {
sed ':begin;$!N;s/\n/%0A/;tbegin'
}
if [[ $(git diff-index --name-only HEAD --) ]]; then
for x in $(git diff-index --name-only HEAD --); do
echo "::error file=$x::Please run buildifier.%0A$(git diff $x | urlencode)"
done
echo "${{ github.repository }} is out of style. Please run buildifier."
exit 1
fi
echo "${{ github.repository }} is formatted correctly."
./knife lint --check
67 changes: 0 additions & 67 deletions .github/workflows/update-temurin-packages.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
load("//private/oci:defs.bzl", "sign_and_push_all")
load("//private/tools/lifecycle:defs.bzl", "attach_lifecycle_tags")
load("//static:config.bzl", "STATIC_ARCHITECTURES", "STATIC_DISTROS")
load("//base:config.bzl", "BASE_ARCHITECTURES", "BASE_DISTROS")
load("//cc:config.bzl", "CC_ARCHITECTURES", "CC_DISTROS")
load("//nodejs:config.bzl", "NODEJS_ARCHITECTURES", "NODEJS_DISTROS", "NODEJS_MAJOR_VERSIONS")
load("//java:config.bzl", "JAVA_ARCHITECTURES", "JAVA_DISTROS", "JAVA_MAJOR_VERSIONS")
load("//nodejs:config.bzl", "NODEJS_ARCHITECTURES", "NODEJS_DISTROS", "NODEJS_MAJOR_VERSIONS")
load("//private/oci:defs.bzl", "sign_and_push_all")
load("//private/tools/lifecycle:defs.bzl", "attach_lifecycle_tags")
load("//python3:config.bzl", "PYTHON_ARCHITECTURES", "PYTHON_DISTROS")
load("//static:config.bzl", "STATIC_ARCHITECTURES", "STATIC_DISTROS")

package(default_visibility = ["//visibility:public"])

Expand Down
2 changes: 1 addition & 1 deletion cc/cc.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_image_index")
load("//private/util:deb.bzl", "deb")
load("//common:variables.bzl", "DEBUG_MODE", "USERS")
load("//private/util:deb.bzl", "deb")

def cc_image_index(distro, architectures):
"""cc image index for a distro
Expand Down
4 changes: 2 additions & 2 deletions examples/nonroot/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# reference only. Note that repo maintainers can freely change any part of the
# repository code at any time.
load("@container_structure_test//:defs.bzl", "container_structure_test")
load("@rules_go//go:def.bzl", "go_binary")
load("@rules_distroless//distroless:defs.bzl", "home", "passwd")
load("@rules_go//go:def.bzl", "go_binary")
load("@rules_oci//oci:defs.bzl", "oci_image")
load("//private/util:tar.bzl", "tar")
load("//:distro.bzl", DISTROS = "ALL_DISTROS")
load("//private/util:tar.bzl", "tar")

# Create a passwd file and home directory with a nonroot user and uid.
passwd(
Expand Down
2 changes: 1 addition & 1 deletion java/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load(":java.bzl", "java_base_image", "java_base_image_index", "java_image", "java_image_index")
load(":config.bzl", "JAVA_ARCHITECTURES", "JAVA_BASE_PACKAGES", "JAVA_DISTROS")
load(":java.bzl", "java_base_image", "java_base_image_index", "java_image", "java_image_index")

package(default_visibility = ["//visibility:public"])

Expand Down
2 changes: 1 addition & 1 deletion java/java.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

load("@container_structure_test//:defs.bzl", "container_structure_test")
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_image_index")
load("//private/util:tar.bzl", "tar")
load("//common:variables.bzl", "DEBUG_MODE", "USERS")
load("//java:jre_ver.bzl", "jre_ver")
load("//private/oci:defs.bzl", oci_java_image = "java_image")
load("//private/util:deb.bzl", "deb")
load("//private/util:java_cacerts.bzl", "java_cacerts")
load("//private/util:tar.bzl", "tar")

def ca_certs(distro, arch):
"""java ca certs for a specific arch and distro
Expand Down
8 changes: 6 additions & 2 deletions knife
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,18 @@ function cmd_github_update_snapshots() {
}

function cmd_lint () {
local mode="fix"
if [[ "${1:-}" == "--check" ]]; then
mode="check"
fi
echo "🧹 Linting"
echo ""
if ! which buildifier > /dev/null; then
echo "🧱 No buildifier executable was found."
echo " Did you follow the ./CONTRIBUTING.md ?"
exit 1
fi
buildifier -mode=fix $(find . -name 'BUILD*' -o -name 'WORKSPACE*' -o -name '*.bzl' -type f)
buildifier -mode=$mode $(find . -type f \( -name 'BUILD*' -o -name 'WORKSPACE*' -o -name '*.bzl' \))
}

function cmd_update_node_archives () {
Expand Down Expand Up @@ -216,7 +220,7 @@ update-non-snapshots)
cmd_lock_non_snapshots
;;
lint)
cmd_lint
cmd_lint "${@:2}"
;;
github-update-snapshots)
cmd_github_update_snapshots
Expand Down
2 changes: 1 addition & 1 deletion nodejs/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load(":nodejs.bzl", "nodejs_image", "nodejs_image_index")
load(":config.bzl", "NODEJS_ARCHITECTURES", "NODEJS_DISTROS", "NODEJS_MAJOR_VERSIONS")
load(":nodejs.bzl", "nodejs_image", "nodejs_image_index")

package(default_visibility = ["//visibility:public"])

Expand Down
2 changes: 1 addition & 1 deletion nodejs/nodejs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

load("@container_structure_test//:defs.bzl", "container_structure_test")
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_image_index")
load("//private/util:tar.bzl", "tar")
load("//common:variables.bzl", "DEBUG_MODE", "USERS")
load("//private/util:tar.bzl", "tar")

def nodejs_image_index(distro, major_version, architectures):
"""nodejs image index for a distro.
Expand Down
4 changes: 2 additions & 2 deletions private/oci/defs.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load(":java_image.bzl", _java_image = "java_image")
load(":cc_image.bzl", _cc_image = "cc_image")
load(":rust_image.bzl", _rust_image = "rust_image")
load(":go_image.bzl", _go_image = "go_image")
load(":java_image.bzl", _java_image = "java_image")
load(":rust_image.bzl", _rust_image = "rust_image")
load(":sign_and_push.bzl", _sign_and_push_all = "sign_and_push_all")

java_image = _java_image
Expand Down
2 changes: 1 addition & 1 deletion private/oci/rust_image.bzl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"rust_image rule for creating Rust container images"

load("@rules_oci//oci:defs.bzl", "oci_image")
load("//private/util:tar.bzl", "tar")
load("@rules_rust//rust:defs.bzl", "rust_binary")
load("//private/util:tar.bzl", "tar")

def rust_image(name, srcs, base, tags):
rust_binary(
Expand Down
2 changes: 1 addition & 1 deletion private/pkg/test/oci_image/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_image_index")
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_image_index")
load("//private/pkg:oci_image_spdx.bzl", "oci_image_spdx")
load("//private/util:deb.bzl", "deb")

Expand Down
4 changes: 2 additions & 2 deletions python3/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load(":config.bzl", "PYTHON_ARCHITECTURES", "PYTHON_DISTROS", "PYTHON_PACKAGES")
load(":python.bzl", "python3_image", "python3_image_index")
load("//private/util:tar.bzl", "tar")
load(":config.bzl", "PYTHON_ARCHITECTURES", "PYTHON_DISTROS", "PYTHON_PACKAGES")
load(":ldconfig.bzl", "python3_ldconfig")
load(":python.bzl", "python3_image", "python3_image_index")

package(default_visibility = ["//visibility:public"])

Expand Down
Loading