Skip to content

Commit

Permalink
chore(build): move sha256 checksum to .requirements
Browse files Browse the repository at this point in the history
Move the SHA256 values of the GitHub repositories used in Bazel to .requirements for easier version bumping of these dependencies.

KAG-4009
  • Loading branch information
Water-Melon authored and fffonion committed May 16, 2024
1 parent f1bd6d4 commit a636120
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .requirements
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
KONG_PACKAGE_NAME=kong

OPENRESTY=1.25.3.1
OPENRESTY_SHA256=32ec1a253a5a13250355a075fe65b7d63ec45c560bbe213350f0992a57cd79df
LUAROCKS=3.11.0
LUAROCKS_SHA256=25f56b3c7272fb35b869049371d649a1bbe668a56d24df0a66e3712e35dd44a6
OPENSSL=3.2.1
OPENSSL_SHA256=83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39
PCRE=10.43
PCRE_SHA256=889d16be5abb8d05400b33c25e151638b8d4bac0e2d9c76e9d6923118ae8a34e
LIBEXPAT=2.6.2
LIBEXPAT_SHA256=d4cf38d26e21a56654ffe4acd9cd5481164619626802328506a2869afab29ab3

# Note: git repositories can be loaded from local path if path is set as value

Expand Down
2 changes: 1 addition & 1 deletion build/libexpat/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def libexpat_repositories():
http_archive,
name = "libexpat",
url = "https://github.com/libexpat/libexpat/releases/download/" + tag + "/expat-" + version + ".tar.gz",
sha256 = "d4cf38d26e21a56654ffe4acd9cd5481164619626802328506a2869afab29ab3",
sha256 = KONG_VAR["LIBEXPAT_SHA256"],
strip_prefix = "expat-" + version,
build_file = "//build/libexpat:BUILD.libexpat.bazel",
)
2 changes: 1 addition & 1 deletion build/luarocks/luarocks_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def luarocks_repositories():
name = "luarocks",
build_file = "//build/luarocks:BUILD.luarocks.bazel",
strip_prefix = "luarocks-" + version,
sha256 = "25f56b3c7272fb35b869049371d649a1bbe668a56d24df0a66e3712e35dd44a6",
sha256 = KONG_VAR["LUAROCKS_SHA256"],
urls = [
"https://luarocks.org/releases/luarocks-" + version + ".tar.gz",
],
Expand Down
2 changes: 1 addition & 1 deletion build/openresty/openssl/openssl_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def openssl_repositories():
http_archive,
name = "openssl",
build_file = "//build/openresty/openssl:BUILD.bazel",
sha256 = "83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39",
sha256 = KONG_VAR["OPENSSL_SHA256"],
strip_prefix = "openssl-" + version,
urls = [
"https://www.openssl.org/source/openssl-" + version + ".tar.gz",
Expand Down
2 changes: 1 addition & 1 deletion build/openresty/pcre/pcre_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def pcre_repositories():
name = "pcre",
build_file = "//build/openresty/pcre:BUILD.pcre.bazel",
strip_prefix = "pcre2-" + version,
sha256 = "889d16be5abb8d05400b33c25e151638b8d4bac0e2d9c76e9d6923118ae8a34e",
sha256 = KONG_VAR["PCRE_SHA256"],
urls = [
"https://github.com/PCRE2Project/pcre2/releases/download/pcre2-" + version + "/pcre2-" + version + ".tar.gz",
],
Expand Down
2 changes: 1 addition & 1 deletion build/openresty/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def openresty_repositories():
openresty_http_archive_wrapper,
name = "openresty",
build_file = "//build/openresty:BUILD.openresty.bazel",
sha256 = "32ec1a253a5a13250355a075fe65b7d63ec45c560bbe213350f0992a57cd79df",
sha256 = KONG_VAR["OPENRESTY_SHA256"],
strip_prefix = "openresty-" + openresty_version,
urls = [
"https://openresty.org/download/openresty-" + openresty_version + ".tar.gz",
Expand Down

1 comment on commit a636120

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Bazel Build

Docker image available kong/kong:a63612037fecdc85a861783e1e7a2b76ea19f5be
Artifacts available https://github.com/Kong/kong/actions/runs/9107874123

Please sign in to comment.