Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
a92c26d8
Commit
a92c26d8
authored
Feb 23, 2019
by
Jeff Grafton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bazel: create genrules to produce debs and RPMs without arch-specific names
parent
5312ade3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
24 deletions
+36
-24
BUILD
build/debs/BUILD
+18
-12
BUILD
build/rpms/BUILD
+18
-12
No files found.
build/debs/BUILD
View file @
a92c26d8
...
@@ -21,32 +21,38 @@ release_filegroup(
...
@@ -21,32 +21,38 @@ release_filegroup(
name = "debs",
name = "debs",
conditioned_srcs = for_platforms(
conditioned_srcs = for_platforms(
default = [],
default = [],
for_client = [":kubectl
-{ARCH}
.deb"],
for_client = [":kubectl.deb"],
for_node = [
for_node = [
":cri-tools
-{ARCH}
.deb",
":cri-tools.deb",
":kubeadm
-{ARCH}
.deb",
":kubeadm.deb",
":kubelet
-{ARCH}
.deb",
":kubelet.deb",
":kubernetes-cni
-{ARCH}
.deb",
":kubernetes-cni.deb",
],
],
only_os = "linux",
only_os = "linux",
),
),
)
)
# Create
aliases from the non-arch names to the arch-specific names for backwards compatibility
# Create
genrules to copy the arch-specific debs to debs without the arch in their filename.
alias
(
genrule
(
name = "kubectl",
name = "kubectl",
actual
= select(for_platforms(
srcs
= select(for_platforms(
for_client =
":kubectl-{ARCH}"
,
for_client =
[":kubectl-{ARCH}.deb"]
,
only_os = "linux",
only_os = "linux",
)),
)),
outs = ["kubectl.deb"],
cmd = "cp $< $@",
output_to_bindir = True,
)
)
[
alias
(
[
genrule
(
name = pkg,
name = pkg,
actual
= select(for_platforms(
srcs
= select(for_platforms(
for_node =
":%s-{ARCH}" % pkg
,
for_node =
[":%s-{ARCH}.deb" % pkg]
,
only_os = "linux",
only_os = "linux",
)),
)),
outs = ["%s.deb" % pkg],
cmd = "cp $< $@",
output_to_bindir = True,
) for pkg in [
) for pkg in [
"cri-tools",
"cri-tools",
"kubeadm",
"kubeadm",
...
...
build/rpms/BUILD
View file @
a92c26d8
...
@@ -9,12 +9,12 @@ release_filegroup(
...
@@ -9,12 +9,12 @@ release_filegroup(
name = "rpms",
name = "rpms",
conditioned_srcs = for_platforms(
conditioned_srcs = for_platforms(
default = [],
default = [],
for_client = [":kubectl
-{ARCH}
"],
for_client = [":kubectl
.rpm
"],
for_node = [
for_node = [
":cri-tools
-{ARCH}
",
":cri-tools
.rpm
",
":kubeadm
-{ARCH}
",
":kubeadm
.rpm
",
":kubelet
-{ARCH}
",
":kubelet
.rpm
",
":kubernetes-cni
-{ARCH}
",
":kubernetes-cni
.rpm
",
],
],
only_os = "linux",
only_os = "linux",
),
),
...
@@ -22,21 +22,27 @@ release_filegroup(
...
@@ -22,21 +22,27 @@ release_filegroup(
visibility = ["//visibility:public"],
visibility = ["//visibility:public"],
)
)
# Create
aliases from the non-arch names to the arch-specific names for backwards compatibility
# Create
genrules to copy the arch-specific RPMs to RPMs without the arch in their filename.
alias
(
genrule
(
name = "kubectl",
name = "kubectl",
actual
= select(for_platforms(
srcs
= select(for_platforms(
for_client =
":kubectl-{ARCH}"
,
for_client =
[":kubectl-{ARCH}.rpm"]
,
only_os = "linux",
only_os = "linux",
)),
)),
outs = ["kubectl.rpm"],
cmd = "cp $< $@",
output_to_bindir = True,
)
)
[
alias
(
[
genrule
(
name = pkg,
name = pkg,
actual
= select(for_platforms(
srcs
= select(for_platforms(
for_client =
":%s-{ARCH}" % pkg
,
for_client =
[":%s-{ARCH}.rpm" % pkg]
,
only_os = "linux",
only_os = "linux",
)),
)),
outs = ["%s.rpm" % pkg],
cmd = "cp $< $@",
output_to_bindir = True,
) for pkg in [
) for pkg in [
"cri-tools",
"cri-tools",
"kubeadm",
"kubeadm",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment