Skip to content

Commit 5082533

Browse files
erock2112SkCQ
authored andcommitted
[bazel] Migrate CIPD packages to MODULE.bazel
Bug: b/458681039 Change-Id: I189d70ac9e7a50fb4ba30ef7cb254d7d1264dd60 Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/1121397 Reviewed-by: Kaylee Lubick <[email protected]> Commit-Queue: Kaylee Lubick <[email protected]> Auto-Submit: Eric Boren <[email protected]>
1 parent d4015a1 commit 5082533

File tree

9 files changed

+188
-187
lines changed

9 files changed

+188
-187
lines changed

MODULE.bazel

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,3 +519,54 @@ filegroup(
519519
sha256 = "bb9b55630aa63da22bafb2132f06fe00f298ef16272a99134e69495c37b33ce9",
520520
url = "https://github.com/jwilder/dockerize/releases/download/v0.7.0/dockerize-linux-amd64-v0.7.0.tar.gz",
521521
)
522+
523+
####################################################################################################
524+
# CIPD packages.
525+
####################################################################################################
526+
527+
cipd = use_extension("//bazel/external:cipd_install.bzl", "cipd")
528+
cipd.package(
529+
name = "git_amd64_linux",
530+
cipd_package = "infra/3pp/tools/git/linux-amd64",
531+
postinstall_cmds_posix = [
532+
"mkdir etc",
533+
"bin/git config --system user.name \"Bazel Test User\"",
534+
"bin/git config --system user.email \"[email protected]\"",
535+
],
536+
# From https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/git/linux-amd64/+/version:2.29.2.chromium.6
537+
sha256 = "36cb96051827d6a3f6f59c5461996fe9490d997bcd2b351687d87dcd4a9b40fa",
538+
tag = "version:2.29.2.chromium.6",
539+
)
540+
use_repo(cipd, "git_amd64_linux")
541+
542+
cipd.package(
543+
name = "git_amd64_windows",
544+
cipd_package = "infra/3pp/tools/git/windows-amd64",
545+
postinstall_cmds_win = [
546+
"mkdir etc",
547+
"bin/git.exe config --system user.name \"Bazel Test User\"",
548+
"bin/git.exe config --system user.email \"[email protected]\"",
549+
],
550+
# From https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/git/windows-amd64/+/version:2.29.2.chromium.6
551+
sha256 = "9caaf2c6066bdcfa94f917323c4031cf7e32572848f8621ecd0d328babee220a",
552+
tag = "version:2.29.2.chromium.6",
553+
)
554+
use_repo(cipd, "git_amd64_windows")
555+
556+
cipd.package(
557+
name = "vpython_amd64_linux",
558+
cipd_package = "infra/tools/luci/vpython/linux-amd64",
559+
# From https://chrome-infra-packages.appspot.com/p/infra/tools/luci/vpython/linux-amd64/+/git_revision:31868238187077557113efa2bd4e2c7e3b3ec970
560+
sha256 = "ec210b3873665208c42e80883546d22d5f448f04e736f1e1fc015da7fc3003a3",
561+
tag = "git_revision:31868238187077557113efa2bd4e2c7e3b3ec970",
562+
)
563+
use_repo(cipd, "vpython_amd64_linux")
564+
565+
cipd.package(
566+
name = "cpython3_amd64_linux",
567+
cipd_package = "infra/3pp/tools/cpython3/linux-amd64",
568+
# From https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/cpython3/linux-amd64/+/version:[email protected]
569+
sha256 = "0ff2955adf65e2921c4abd8e2848862d3c7731feeda5c506f44e796aa4af2dc7",
570+
tag = "version:[email protected]",
571+
)
572+
use_repo(cipd, "cpython3_amd64_linux")

MODULE.bazel.lock

Lines changed: 86 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

WORKSPACE

Lines changed: 3 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -34,67 +34,6 @@ rbe_exec_properties(
3434
name = "exec_properties",
3535
)
3636

37-
##################
38-
# CIPD packages. #
39-
##################
40-
41-
load("//bazel/external:cipd_install.bzl", "all_cipd_files", "cipd_install")
42-
43-
cipd_install(
44-
name = "git_amd64_linux",
45-
build_file_content = all_cipd_files(),
46-
cipd_package = "infra/3pp/tools/git/linux-amd64",
47-
postinstall_cmds_posix = [
48-
"mkdir etc",
49-
"bin/git config --system user.name \"Bazel Test User\"",
50-
"bin/git config --system user.email \"[email protected]\"",
51-
],
52-
# From https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/git/linux-amd64/+/version:2.29.2.chromium.6
53-
sha256 = "36cb96051827d6a3f6f59c5461996fe9490d997bcd2b351687d87dcd4a9b40fa",
54-
tag = "version:2.29.2.chromium.6",
55-
)
56-
57-
cipd_install(
58-
name = "git_amd64_windows",
59-
build_file_content = all_cipd_files(),
60-
cipd_package = "infra/3pp/tools/git/windows-amd64",
61-
postinstall_cmds_win = [
62-
"mkdir etc",
63-
"bin/git.exe config --system user.name \"Bazel Test User\"",
64-
"bin/git.exe config --system user.email \"[email protected]\"",
65-
],
66-
# From https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/git/windows-amd64/+/version:2.29.2.chromium.6
67-
sha256 = "9caaf2c6066bdcfa94f917323c4031cf7e32572848f8621ecd0d328babee220a",
68-
tag = "version:2.29.2.chromium.6",
69-
)
70-
71-
cipd_install(
72-
name = "vpython_amd64_linux",
73-
build_file_content = all_cipd_files(),
74-
cipd_package = "infra/tools/luci/vpython/linux-amd64",
75-
# From https://chrome-infra-packages.appspot.com/p/infra/tools/luci/vpython/linux-amd64/+/git_revision:31868238187077557113efa2bd4e2c7e3b3ec970
76-
sha256 = "ec210b3873665208c42e80883546d22d5f448f04e736f1e1fc015da7fc3003a3",
77-
tag = "git_revision:31868238187077557113efa2bd4e2c7e3b3ec970",
78-
)
79-
80-
cipd_install(
81-
name = "cpython3_amd64_linux",
82-
build_file_content = all_cipd_files(),
83-
cipd_package = "infra/3pp/tools/cpython3/linux-amd64",
84-
# From https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/cpython3/linux-amd64/+/version:[email protected]
85-
sha256 = "0ff2955adf65e2921c4abd8e2848862d3c7731feeda5c506f44e796aa4af2dc7",
86-
tag = "version:[email protected]",
87-
)
88-
89-
cipd_install(
90-
name = "patch_amd64_linux",
91-
build_file_content = all_cipd_files(),
92-
cipd_package = "skia/bots/patch_linux_amd64",
93-
# From https://chrome-infra-packages.appspot.com/p/skia/bots/patch/+/version:0
94-
sha256 = "757fd36db06f291f77a91aa314b855af449665a606d627ce16c36813464e1df6",
95-
tag = "version:0",
96-
)
97-
9837
#############################################################
9938
# Google Cloud SDK (needed for the Google Cloud Emulators). #
10039
#############################################################
@@ -142,9 +81,9 @@ filegroup(
14281
urls = ["https://storage.googleapis.com/pgadapter-jar-releases/pgadapter-v0.47.1.tar.gz"],
14382
)
14483

145-
#################################################################################
146-
# Google Chrome and Fonts (needed for Karma and Puppeteer tests, respectively). #
147-
#################################################################################
84+
# #################################################################################
85+
# # Google Chrome and Fonts (needed for Karma and Puppeteer tests, respectively). #
86+
# #################################################################################
14887

14988
# TODO(borenet): we should be able to use this from rules_browsers.
15089
load("//bazel/external:google_chrome.bzl", "google_chrome")

bazel/external/cipd/cpython3/cpython3.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
// corresponding CIPD package, which Bazel will download as needed.
1515
func FindPythonBinary() (string, error) {
1616
if runtime.GOOS == "linux" {
17-
return filepath.Join(bazel.RunfilesDir(), "external", "cpython3_amd64_linux", "bin", "python3.11"), nil
17+
return filepath.Join(bazel.RunfilesDir(), "external", "_main~cipd~cpython3_amd64_linux", "bin", "python3.11"), nil
1818
}
1919
return "", skerr.Fmt("unsupported runtime.GOOS: %q", runtime.GOOS)
2020
}

bazel/external/cipd/git/git.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ func FindGit() (string, error) {
2020
return exec.LookPath("git")
2121
}
2222
if runtime.GOOS == "windows" {
23-
return filepath.Join(bazel.RunfilesDir(), "external", "git_amd64_windows", "bin", "git.exe"), nil
23+
return filepath.Join(bazel.RunfilesDir(), "external", "_main~cipd~git_amd64_windows", "bin", "git.exe"), nil
2424
} else if runtime.GOOS == "linux" {
25-
return filepath.Join(bazel.RunfilesDir(), "external", "git_amd64_linux", "bin", "git"), nil
25+
return filepath.Join(bazel.RunfilesDir(), "external", "_main~cipd~git_amd64_linux", "bin", "git"), nil
2626
}
2727
return "", skerr.Fmt("unsupported runtime.GOOS: %q", runtime.GOOS)
2828
}

bazel/external/cipd/patch/BUILD.bazel

Lines changed: 0 additions & 16 deletions
This file was deleted.

bazel/external/cipd/patch/patch.go

Lines changed: 0 additions & 24 deletions
This file was deleted.

bazel/external/cipd/vpython/vpython.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
// corresponding CIPD package, which Bazel will download as needed.
1515
func FindVPython3() (string, error) {
1616
if runtime.GOOS == "linux" {
17-
return filepath.Join(bazel.RunfilesDir(), "external", "vpython_amd64_linux", "vpython3"), nil
17+
return filepath.Join(bazel.RunfilesDir(), "external", "_main~cipd~vpython_amd64_linux", "vpython3"), nil
1818
}
1919
return "", skerr.Fmt("unsupported runtime.GOOS: %q", runtime.GOOS)
2020
}

0 commit comments

Comments
 (0)