This repository was archived by the owner on Mar 9, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ INCLUDE_CNI=${INCLUDE_CNI:-false}
3535CUSTOM_CONTAINERD=${CUSTOM_CONTAINERD:- false}
3636# OFFICIAL_RELEASE indicates whether to use official containerd release.
3737OFFICIAL_RELEASE=${OFFICIAL_RELEASE:- false}
38+ # LOCAL_RELEASE indicates that containerd has been built and released
39+ # locally.
40+ LOCAL_RELEASE=${LOCAL_RELEASE:- false}
41+
3842
3943destdir=${BUILD_DIR} /release-stage
4044
@@ -56,6 +60,16 @@ download_containerd() {
5660 rm -rf " ${tmppath} "
5761}
5862
63+ # copy_local_containerd copies local containerd release.
64+ copy_local_containerd () {
65+ local -r tarball=" ${GOPATH} /src/github.com/containerd/containerd/releases/containerd-${VERSION} .linux-amd64.tar.gz"
66+ if [[ ! -e " ${tarball} " ]]; then
67+ echo " Containerd release is not built"
68+ exit 1
69+ fi
70+ tar -C " ${destdir} /usr/local" -xzf " ${tarball} "
71+ }
72+
5973# Install dependencies into release stage.
6074# Install runc
6175NOSUDO=true DESTDIR=${destdir} ./hack/install/install-runc.sh
@@ -71,6 +85,8 @@ NOSUDO=true DESTDIR=${destdir} ./hack/install/install-critools.sh
7185# Install containerd
7286if $OFFICIAL_RELEASE ; then
7387 download_containerd
88+ elif $LOCAL_RELEASE ; then
89+ copy_local_containerd
7490else
7591 # Build containerd from source
7692 NOSUDO=true DESTDIR=${destdir} ./hack/install/install-containerd.sh
You can’t perform that action at this time.
0 commit comments