-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathWORKSPACE
186 lines (137 loc) · 5.55 KB
/
WORKSPACE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
workspace(name = "home-ops")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
# Age binary
http_archive(
name = "age",
build_file = "@home-ops//bazel/third_party:age.bazel",
sha256 = "7df45a6cc87d4da11cc03a539a7470c15b1041ab2b396af088fe9990f7c79d50",
url = "https://github.com/FiloSottile/age/releases/download/v1.2.1/age-v1.2.1-linux-amd64.tar.gz",
)
# Packer binary
http_archive(
name = "packer",
build_file = "@home-ops//bazel/third_party:packer.bazel",
sha256 = "790183b1febe0f3f919bac22b193dfbba031a6e30a148ecc69816fcc47eec702",
url = "https://releases.hashicorp.com/packer/1.8.4/packer_1.8.4_linux_386.zip",
)
# Coder binary
http_archive(
name = "coder",
build_file = "@home-ops//bazel/third_party:coder.bazel",
sha256 = "b568bbe9cdca065b396556376ee050dca5405a2de8ea824182a0e628f8c3e417",
url = "https://github.com/coder/coder/releases/download/v2.19.0/coder_2.19.0_linux_amd64.tar.gz",
)
# Bazelisk binary
http_file(
name = "bazelisk",
executable=True,
sha256 = "fd8fdff418a1758887520fa42da7e6ae39aefc788cf5e7f7bb8db6934d279fc4",
url = "https://github.com/bazelbuild/bazelisk/releases/download/v1.25.0/bazelisk-linux-amd64",
)
# Skylib
http_archive(
name = "bazel_skylib",
sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
],
)
# Python
http_archive(
name = "rules_python",
sha256 = "9c6e26911a79fbf510a8f06d8eedb40f412023cf7fa6d1461def27116bff022c",
strip_prefix = "rules_python-1.1.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.1.0/rules_python-1.1.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
py_repositories()
python_register_toolchains(
name = "python3_10",
python_version = "3.10",
)
# Files
http_archive(
name = "rules_file",
sha256 = "9869dc0c3404784d53c61e465b7b455f237671895e6bde6975540bdc9d0740ca",
strip_prefix = "rules_file-7bd1ebf65d4b8e3b8d90ce6e5741d45358866d90",
url = "https://github.com/rivethealth/rules_file/archive/7bd1ebf65d4b8e3b8d90ce6e5741d45358866d90.zip",
)
load("@rules_file//rules:init.bzl", "file_init")
file_init()
load("@rules_file//rules:workspace.bzl", "file_repositories")
file_repositories()
# aspect bazel lib
http_archive(
name = "aspect_bazel_lib",
sha256 = "57a777c5d4d0b79ad675995ee20fc1d6d2514a1ef3000d98f5c70cf0c09458a3",
strip_prefix = "bazel-lib-2.13.0",
url = "https://github.com/bazel-contrib/bazel-lib/releases/download/v2.13.0/bazel-lib-v2.13.0.tar.gz",
)
load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "aspect_bazel_lib_register_toolchains")
# Required bazel-lib dependencies
aspect_bazel_lib_dependencies()
# Register bazel-lib toolchains
aspect_bazel_lib_register_toolchains()
# rules_pkg
http_archive(
name = "rules_pkg",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/1.0.1/rules_pkg-1.0.1.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/1.0.1/rules_pkg-1.0.1.tar.gz",
],
sha256 = "d20c951960ed77cb7b341c2a59488534e494d5ad1d30c4818c736d57772a9fef",
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
# rules_oci
http_archive(
name = "rules_oci",
sha256 = "cfea16076ebbec1faea494882ab97d94b1a62d6bcd5aceabad8f95ea0d0a1361",
strip_prefix = "rules_oci-2.2.1",
url = "https://github.com/bazel-contrib/rules_oci/releases/download/v2.2.1/rules_oci-v2.2.1.tar.gz",
)
load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
rules_oci_dependencies()
load("@rules_oci//oci:repositories.bzl", "oci_register_toolchains")
oci_register_toolchains(name = "oci")
# You can pull your base images using oci_pull like this:
load("@rules_oci//oci:pull.bzl", "oci_pull")
oci_pull(
name = "distroless_base",
digest = "sha256:7a4bffcb07307d97aa731b50cb6ab22a68a8314426f4e4428335939b5b1943a5",
image = "gcr.io/distroless/base",
platforms = [
"linux/amd64",
],
)
oci_pull(
name = "actions_runner",
digest = "sha256:1130c86182311ddb6d16d473e74164dee94f7b2132c333ae48904af5709cca3d",
image = "ghcr.io/actions/actions-runner",
platforms = [
"linux/amd64",
],
)
# rules_distroless
http_archive(
name = "rules_distroless",
sha256 = "6d1d739617e48fc3579781e694d3fabb08fc6c9300510982c01882732c775b8e",
strip_prefix = "rules_distroless-0.3.8",
url = "https://github.com/GoogleContainerTools/rules_distroless/releases/download/v0.3.8/rules_distroless-v0.3.8.tar.gz",
)
load("@rules_distroless//distroless:dependencies.bzl", "distroless_dependencies")
distroless_dependencies()
load("@rules_distroless//distroless:toolchains.bzl", "distroless_register_toolchains")
distroless_register_toolchains()
load("@rules_distroless//apt:index.bzl", "deb_index")
deb_index(
name = "ubuntu_jammy",
# For the initial setup, the lockfile attribute can be omitted and generated by running
# bazel run @ubuntu_jammy//:lock
# This will generate the lock.json file next to the manifest file by replacing `.yaml` with `.lock.json`
lock = "//images/actions-runner:apt.lock.json",
manifest = "//images/actions-runner:apt.yaml",
)
load("@ubuntu_jammy//:packages.bzl", "ubuntu_jammy_packages")
ubuntu_jammy_packages()