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
1caae631
Commit
1caae631
authored
Apr 19, 2022
by
Brad Davidson
Committed by
Brad Davidson
Apr 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CNI Plugins and Flannel version to build scripts
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
418c3fa8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
build
scripts/build
+7
-3
version.sh
scripts/version.sh
+6
-1
No files found.
scripts/build
View file @
1caae631
...
@@ -13,6 +13,7 @@ PKG_K3S_CONTAINERD="github.com/k3s-io/containerd"
...
@@ -13,6 +13,7 @@ PKG_K3S_CONTAINERD="github.com/k3s-io/containerd"
PKG_CRICTL
=
"github.com/kubernetes-sigs/cri-tools/pkg"
PKG_CRICTL
=
"github.com/kubernetes-sigs/cri-tools/pkg"
PKG_K8S_BASE
=
"k8s.io/component-base"
PKG_K8S_BASE
=
"k8s.io/component-base"
PKG_K8S_CLIENT
=
"k8s.io/client-go/pkg"
PKG_K8S_CLIENT
=
"k8s.io/client-go/pkg"
PKG_CNI_PLUGINS
=
"github.com/containernetworking/plugins"
buildDate
=
$(
date
-u
'+%Y-%m-%dT%H:%M:%SZ'
)
buildDate
=
$(
date
-u
'+%Y-%m-%dT%H:%M:%SZ'
)
...
@@ -35,8 +36,11 @@ VERSIONFLAGS="
...
@@ -35,8 +36,11 @@ VERSIONFLAGS="
-X
${
PKG_CONTAINERD
}
/version.Version=
${
VERSION_CONTAINERD
}
-X
${
PKG_CONTAINERD
}
/version.Version=
${
VERSION_CONTAINERD
}
-X
${
PKG_CONTAINERD
}
/version.Package=
${
PKG_K3S_CONTAINERD
}
-X
${
PKG_CONTAINERD
}
/version.Package=
${
PKG_K3S_CONTAINERD
}
-X
${
PKG_CONTAINERD
}
/version.Version=
${
VERSION_CONTAINERD
}
-X
${
PKG_CNI_PLUGINS
}
/pkg/utils/buildversion.BuildVersion=
${
VERSION_CNIPLUGINS
}
-X
${
PKG_CONTAINERD
}
/version.Package=
${
PKG_K3S_CONTAINERD
}
-X
${
PKG_CNI_PLUGINS
}
/plugins/meta/flannel.Program=flannel
-X
${
PKG_CNI_PLUGINS
}
/plugins/meta/flannel.Version=
${
VERSION_FLANNEL
}
-X
${
PKG_CNI_PLUGINS
}
/plugins/meta/flannel.Commit=
${
COMMIT
}
-X
${
PKG_CNI_PLUGINS
}
/plugins/meta/flannel.buildDate=
${
buildDate
}
"
"
LDFLAGS
=
"
LDFLAGS
=
"
-w -s"
-w -s"
...
@@ -101,7 +105,7 @@ if [ ! -x ${INSTALLBIN}/cni ]; then
...
@@ -101,7 +105,7 @@ if [ ! -x ${INSTALLBIN}/cni ]; then
WORKDIR
=
$TMPDIR
/src/github.com/containernetworking/plugins
WORKDIR
=
$TMPDIR
/src/github.com/containernetworking/plugins
git clone
-b
$VERSION_CNIPLUGINS
https://github.com/rancher/plugins.git
$WORKDIR
git clone
-b
$VERSION_CNIPLUGINS
https://github.com/rancher/plugins.git
$WORKDIR
cd
$WORKDIR
cd
$WORKDIR
GO111MODULE
=
off
GOPATH
=
$TMPDIR
CGO_ENABLED
=
0
"
${
GO
}
"
build
-tags
"
$TAGS
"
-ldflags
"
$LDFLAGS
$STATIC
"
-o
$INSTALLBIN
/cni
GO111MODULE
=
off
GOPATH
=
$TMPDIR
CGO_ENABLED
=
0
"
${
GO
}
"
build
-tags
"
$TAGS
"
-ldflags
"
$
VERSIONFLAGS
$
LDFLAGS
$STATIC
"
-o
$INSTALLBIN
/cni
)
)
fi
fi
...
...
scripts/version.sh
View file @
1caae631
...
@@ -42,7 +42,12 @@ if [ -z "$VERSION_RUNC" ]; then
...
@@ -42,7 +42,12 @@ if [ -z "$VERSION_RUNC" ]; then
VERSION_RUNC
=
"v0.0.0"
VERSION_RUNC
=
"v0.0.0"
fi
fi
VERSION_CNIPLUGINS
=
"v1.0.1-k3s1"
VERSION_FLANNEL
=
$(
grep
github.com/flannel-io/flannel go.mod |
head
-n1
|
awk
'{print $2}'
)
if
[
-z
"
$VERSION_FLANNEL
"
]
;
then
VERSION_FLANNEL
=
"v0.0.0"
fi
VERSION_CNIPLUGINS
=
"v1.1.1-k3s1"
VERSION_ROOT
=
"v0.11.0"
VERSION_ROOT
=
"v0.11.0"
...
...
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