Skip to content

Commit

Permalink
feat(bazel): Use auto-replace when possible (#20318)
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov authored and pull[bot] committed May 7, 2023
1 parent 5318d00 commit d0a1856
Show file tree
Hide file tree
Showing 9 changed files with 710 additions and 635 deletions.
127 changes: 123 additions & 4 deletions lib/modules/manager/bazel/__snapshots__/extract.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 0,
},
"packageName": "github.com/bitly/go-nsq",
"replaceString": "go_repository(
name = "com_github_bitly_go-nsq",
importpath = "github.com/bitly/go-nsq",
tag = "v1.0.5"
)",
},
{
"currentDigest": "dec09d789f3dba190787f8b4454c7d3c936fed9e",
"currentDigestShort": "dec09d7",
"currentValue": "v0.0.0",
"datasource": "go",
"depName": "com_github_google_uuid",
"depType": "go_repository",
Expand All @@ -24,6 +27,11 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 1,
},
"packageName": "github.com/google/uuid",
"replaceString": "go_repository(
name = "com_github_google_uuid",
importpath = "github.com/google/uuid",
commit = "dec09d789f3dba190787f8b4454c7d3c936fed9e"
)",
},
{
"currentValue": "v2",
Expand All @@ -34,6 +42,11 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 2,
},
"packageName": "gopkg.in/mgo.v2",
"replaceString": "go_repository(
name = "com_gopkgin_mgo_v2",
importpath = "gopkg.in/mgo.v2",
tag = "v2"
)",
},
{
"currentValue": "0.3.1",
Expand All @@ -44,6 +57,11 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 3,
},
"packageName": "bazelbuild/rules_nodejs",
"replaceString": "git_repository(
name = "build_bazel_rules_nodejs",
remote = "https://github.com/bazelbuild/rules_nodejs.git",
tag = "0.3.1",
)",
},
{
"currentValue": "0.6.1",
Expand All @@ -54,6 +72,11 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 4,
},
"packageName": "bazelbuild/rules_typescript",
"replaceString": "git_repository(
name = "build_bazel_rules_typescript",
remote = "https://github.com/bazelbuild/rules_typescript.git",
tag = "0.6.1",
)",
},
{
"currentDigest": "446923c3756ceeaa75888f52fcbdd48bb314fbf8",
Expand All @@ -64,6 +87,12 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 5,
},
"packageName": "GoogleContainerTools/distroless",
"replaceString": "http_archive(
name="distroless",
sha256="f7a6ecfb8174a1dd4713ea3b21621072996ada7e8f1a69e6ae7581be137c6dd6",
strip_prefix="distroless-446923c3756ceeaa75888f52fcbdd48bb314fbf8",
urls=["https://github.com/GoogleContainerTools/distroless/archive/446923c3756ceeaa75888f52fcbdd48bb314fbf8.tar.gz"]
)",
},
{
"currentDigest": "d665ccfa3e9c90fa789671bf4ef5f7c19c5715c4",
Expand All @@ -74,6 +103,15 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 6,
},
"packageName": "bazelbuild/bazel-toolchains",
"replaceString": "http_archive(
name = "bazel_toolchains",
sha256 = "4b1468b254a572dbe134cc1fd7c6eab1618a72acd339749ea343bd8f55c3b7eb",
strip_prefix = "bazel-toolchains-d665ccfa3e9c90fa789671bf4ef5f7c19c5715c4",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/d665ccfa3e9c90fa789671bf4ef5f7c19c5715c4.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/d665ccfa3e9c90fa789671bf4ef5f7c19c5715c4.tar.gz",
],
)",
},
{
"currentValue": "5.5.3",
Expand All @@ -84,6 +122,13 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 7,
},
"packageName": "bazelbuild/rules_nodejs",
"replaceString": "http_archive(
name = "rules_nodejs",
sha256 = "5aef09ed3279aa01d5c928e3beb248f9ad32dde6aafe6373a8c994c3ce643064",
urls = [
"https://github.com/bazelbuild/rules_nodejs/releases/download/5.5.3/rules_nodejs-core-5.5.3.tar.gz"
],
)",
},
{
"currentValue": "0.0.3",
Expand All @@ -94,6 +139,11 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 8,
},
"packageName": "bazelbuild/rules_sass",
"replaceString": "git_repository(
name = "io_bazel_rules_sass",
remote = "https://github.com/bazelbuild/rules_sass.git",
tag = "0.0.3",
)",
},
{
"currentDigest": "b3b620e8bcff18ed3378cd3f35ebeb7016d71f71",
Expand All @@ -104,6 +154,12 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 9,
},
"packageName": "bazelbuild/buildtools",
"replaceString": "git_repository(
name = "com_github_bazelbuild_buildtools",
remote = "https://github.com/bazelbuild/buildtools.git",
# Note, this commit matches the version of buildifier in angular/ngcontainer
commit = "b3b620e8bcff18ed3378cd3f35ebeb7016d71f71",
)",
},
{
"currentValue": "0.7.1",
Expand All @@ -114,6 +170,11 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 10,
},
"packageName": "bazelbuild/rules_go",
"replaceString": "http_archive(
name = "io_bazel_rules_go",
url = "https://github.com/bazelbuild/rules_go/releases/download/0.7.1/rules_go-0.7.1.tar.gz",
sha256 = "341d5eacef704415386974bc82a1783a8b7ffbff2ab6ba02375e1ca20d9b031c",
)",
},
{
"currentValue": "0.5.0",
Expand All @@ -124,6 +185,15 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 11,
},
"packageName": "bazelbuild/bazel-skylib",
"replaceString": "http_archive(
name = "bazel_skylib",
sha256 = "b5f6abe419da897b7901f90cbab08af958b97a8f3575b0d3dd062ac7ce78541f",
strip_prefix = "bazel-skylib-0.5.0",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/0.5.0.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/archive/0.5.0.tar.gz",
],
)",
},
{
"currentDigest": "446923c3756ceeaa75888f52fcbdd48bb314fbf8",
Expand All @@ -134,6 +204,12 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 12,
},
"packageName": "GoogleContainerTools/distroless",
"replaceString": "http_archive(
name="distroless",
sha256="f7a6ecfb8174a1dd4713ea3b21621072996ada7e8f1a69e6ae7581be137c6dd6",
strip_prefix="distroless-446923c3756ceeaa75888f52fcbdd48bb314fbf8",
urls=["https://github.com/GoogleContainerTools/distroless/archive/446923c3756ceeaa75888f52fcbdd48bb314fbf8.tar.gz"]
)",
},
{
"currentValue": "v0.29.0",
Expand All @@ -144,6 +220,12 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 13,
},
"packageName": "bazelbuild/rules_go",
"replaceString": "maybe(
http_archive,
name = "io_bazel_rules_go",
sha256 = "2b1641428dff9018f9e85c0384f03ec6c10660d935b750e3fa1492a281a53b0f",
url = "https://github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip",
)",
},
{
"currentValue": "v0.24.0",
Expand All @@ -154,11 +236,18 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 14,
},
"packageName": "bazelbuild/bazel-gazelle",
"replaceString": "maybe(
http_archive,
name = "bazel_gazelle",
sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
],
)",
},
{
"currentDigest": "816c9085562cd7ee03e7f8188a1cfd942858cded",
"currentDigestShort": "816c908",
"currentValue": "v0.0.0",
"datasource": "go",
"depName": "com_github_pkg_errors",
"depType": "go_repository",
Expand All @@ -167,6 +256,12 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 15,
},
"packageName": "github.com/pkg/errors",
"replaceString": "maybe(
go_repository,
name = "com_github_pkg_errors",
commit = "816c9085562cd7ee03e7f8188a1cfd942858cded",
importpath = "github.com/pkg/errors",
)",
},
{
"currentDigest": "sha256:d5a717649fd93ea5b9c430d7f84e4c37ba219eb53bd73ed1d4a5a98e9edd84a7",
Expand All @@ -181,6 +276,13 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"registryUrls": [
"gcr.io",
],
"replaceString": "container_pull(
name = "py3_image_base",
digest = "sha256:d5a717649fd93ea5b9c430d7f84e4c37ba219eb53bd73ed1d4a5a98e9edd84a7",
registry = "gcr.io",
repository = "distroless/python3-debian10",
tag = "latest",
)",
"versioning": "docker",
},
{
Expand All @@ -192,6 +294,12 @@ exports[`modules/manager/bazel/extract extractPackageFile() extracts multiple ty
"idx": 17,
},
"packageName": "GoogleContainerTools/distroless",
"replaceString": "http_file(
name="distroless",
sha256="f7a6ecfb8174a1dd4713ea3b21621072996ada7e8f1a69e6ae7581be137c6dd6",
strip_prefix="distroless-446923c3756ceeaa75888f52fcbdd48bb314fbf8",
urls=["https://github.com/GoogleContainerTools/distroless/archive/446923c3756ceeaa75888f52fcbdd48bb314fbf8.tar.gz"]
)",
},
]
`;
Expand All @@ -207,6 +315,12 @@ exports[`modules/manager/bazel/extract extractPackageFile() sequential http_arch
"idx": 0,
},
"packageName": "aspect-build/rules_js",
"replaceString": "http_archive(
name = "aspect_rules_js",
sha256 = "db9f446752fe4100320cf8487e8fd476b9af0adf6b99b601bcfd70b289bb0598",
strip_prefix = "rules_js-1.1.2",
url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v1.1.2.tar.gz",
)",
},
{
"currentValue": "5.5.3",
Expand All @@ -217,6 +331,11 @@ exports[`modules/manager/bazel/extract extractPackageFile() sequential http_arch
"idx": 1,
},
"packageName": "bazelbuild/rules_nodejs",
"replaceString": "http_archive(
name = "rules_nodejs",
sha256 = "5aef09ed3279aa01d5c928e3beb248f9ad32dde6aafe6373a8c994c3ce643064",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.5.3/rules_nodejs-core-5.5.3.tar.gz"],
)",
},
]
`;
Loading

0 comments on commit d0a1856

Please sign in to comment.