diff --git a/.bazelrc b/.bazelrc index 0d5d6565..b96dff79 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,4 +1,5 @@ build --nolegacy_external_runfiles build --verbose_failures +build --@io_bazel_rules_go//go/config:pure test --test_output=errors diff --git a/BUILD b/BUILD index b8bfbd2b..23b76d68 100644 --- a/BUILD +++ b/BUILD @@ -13,7 +13,7 @@ # gazelle:proto disable_global load("@bazel_gazelle//:def.bzl", "gazelle") -load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier", "buildifier_test") +load("@buildifier_prebuilt//:rules.bzl", "buildifier") licenses(["notice"]) # Apache 2.0 @@ -49,15 +49,3 @@ buildifier( name = "buildifier-fix", lint_mode = "fix", ) - -buildifier_test( - name = "buildifier_check", - lint_mode = "warn", - lint_warnings = [ - "-module-docstring", - "-function-docstring", - "-function-docstring-header", - "-function-docstring-args", - "-function-docstring-return", - ], -) diff --git a/WORKSPACE b/WORKSPACE index a89dfeac..05a64db9 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -14,27 +14,39 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", - sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3", + sha256 = "6734a719993b1ba4ebe9806e853864395a8d3968ad27f9dd759c196b3eb3abe8", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.45.1/rules_go-v0.45.1.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.45.1/rules_go-v0.45.1.zip", ], ) http_archive( - name = "com_github_bazelbuild_buildtools", - sha256 = "977a0bd4593c8d4c8f45e056d181c35e48aa01ad4f8090bdb84f78dca42f47dc", - strip_prefix = "buildtools-6.1.2", + name = "buildifier_prebuilt", + sha256 = "8ada9d88e51ebf5a1fdff37d75ed41d51f5e677cdbeafb0a22dda54747d6e07e", + strip_prefix = "buildifier-prebuilt-6.4.0", urls = [ - "https://github.com/bazelbuild/buildtools/archive/refs/tags/v6.1.2.tar.gz", + "http://github.com/keith/buildifier-prebuilt/archive/6.4.0.tar.gz", ], ) +load("@buildifier_prebuilt//:deps.bzl", "buildifier_prebuilt_deps") + +buildifier_prebuilt_deps() + +load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") + +bazel_skylib_workspace() + +load("@buildifier_prebuilt//:defs.bzl", "buildifier_prebuilt_register_toolchains") + +buildifier_prebuilt_register_toolchains() + load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") go_rules_dependencies() -go_register_toolchains(version = "1.20.6") +go_register_toolchains(version = "1.21.6") # # Self dependencies @@ -68,10 +80,6 @@ load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") protobuf_deps() -load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies") - -buildifier_dependencies() - load("//skylib:k8s.bzl", "kubeconfig") kubeconfig( diff --git a/gitops/deps.bzl b/gitops/deps.bzl index 23a0e2a5..f392177a 100644 --- a/gitops/deps.bzl +++ b/gitops/deps.bzl @@ -26,10 +26,10 @@ def rules_gitops_dependencies(): maybe( http_archive, name = "bazel_skylib", - sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506", + sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz", - "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz", ], ) @@ -37,19 +37,19 @@ def rules_gitops_dependencies(): maybe( http_archive, name = "bazel_gazelle", - sha256 = "29218f8e0cebe583643cbf93cae6f971be8a2484cdcfa1e45057658df8d54002", + integrity = "sha256-MpOL2hbmcABjA1R5Bj2dJMYO2o15/Uc5Vj9Q0zHLMgk=", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.32.0/bazel-gazelle-v0.32.0.tar.gz", - "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.32.0/bazel-gazelle-v0.32.0.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.35.0/bazel-gazelle-v0.35.0.tar.gz", + "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.35.0/bazel-gazelle-v0.35.0.tar.gz", ], ) maybe( http_archive, name = "aspect_bazel_lib", - sha256 = "d488d8ecca98a4042442a4ae5f1ab0b614f896c0ebf6e3eafff363bcc51c6e62", - strip_prefix = "bazel-lib-1.33.0", - url = "https://github.com/aspect-build/bazel-lib/releases/download/v1.33.0/bazel-lib-v1.33.0.tar.gz", + sha256 = "979667bb7276ee8fcf2c114c9be9932b9a3052a64a647e0dcaacfb9c0016f0a3", + strip_prefix = "bazel-lib-2.4.1", + url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.4.1/bazel-lib-v2.4.1.tar.gz", ) maybe( @@ -65,7 +65,7 @@ def rules_gitops_dependencies(): maybe( http_archive, name = "rules_oci", - sha256 = "176e601d21d1151efd88b6b027a24e782493c5d623d8c6211c7767f306d655c8", - strip_prefix = "rules_oci-1.2.0", - url = "https://github.com/bazel-contrib/rules_oci/releases/download/v1.2.0/rules_oci-v1.2.0.tar.gz", + sha256 = "cf6b8be82cde30daef18a09519d75269650317e40d917c8633cf8e3ab5645ea5", + strip_prefix = "rules_oci-1.7.2", + url = "https://github.com/bazel-contrib/rules_oci/releases/download/v1.7.2/rules_oci-v1.7.2.tar.gz", ) diff --git a/gitops/repositories.bzl b/gitops/repositories.bzl index 132b73fd..a34810ce 100644 --- a/gitops/repositories.bzl +++ b/gitops/repositories.bzl @@ -28,7 +28,7 @@ def rules_gitops_repositories(): bazel_skylib_workspace() gazelle_dependencies() - aspect_bazel_lib_dependencies(override_local_config_platform = True) + aspect_bazel_lib_dependencies() register_jq_toolchains() rules_pkg_dependencies() kustomize_setup(name = "kustomize_bin") diff --git a/skylib/tests/cloudrun/BUILD.bazel b/skylib/tests/cloudrun/BUILD.bazel index 04287dc3..67efd831 100644 --- a/skylib/tests/cloudrun/BUILD.bazel +++ b/skylib/tests/cloudrun/BUILD.bazel @@ -10,9 +10,9 @@ external_image( k8s_deploy( name = "prod", gitops = False, + images = [":image"], manifests = ["run.yaml"], namespace = "cloudrun_project", - images = [":image"], openapi_path = "//skylib:run_schema.json", patches = ["run_patch.yaml"], )