Merge pull request #750 from Random-Liu/download-from-official-release
Download containerd binaries from official release.
This commit is contained in:
commit
825563b20c
@ -19,9 +19,9 @@ Publish the release tarball `cri-containerd-${CONTAINERD_VERSION}.${OS}-${ARCH}.
|
|||||||
git checkout ${RELEASE_VERSION}
|
git checkout ${RELEASE_VERSION}
|
||||||
|
|
||||||
# Publish the release tarball without cni.
|
# Publish the release tarball without cni.
|
||||||
DEPLOY_BUCKET=cri-containerd-release make push TARBALL_PREFIX=cri-containerd VERSION=${CONTAINERD_VERSION}
|
DEPLOY_BUCKET=cri-containerd-release make push TARBALL_PREFIX=cri-containerd OFFICIAL_RELEASE=true VERSION=${CONTAINERD_VERSION}
|
||||||
|
|
||||||
# Publish the release tarball with cni.
|
# Publish the release tarball with cni.
|
||||||
DEPLOY_BUCKET=cri-containerd-release make push TARBALL_PREFIX=cri-containerd-cni INCLUDE_CNI=true VERSION=${CONTAINERD_VERSION}
|
DEPLOY_BUCKET=cri-containerd-release make push TARBALL_PREFIX=cri-containerd-cni OFFICIAL_RELEASE=true INCLUDE_CNI=true VERSION=${CONTAINERD_VERSION}
|
||||||
```
|
```
|
||||||
## Step 6: Update release note with release tarball information
|
## Step 6: Update release note with release tarball information
|
||||||
|
@ -28,27 +28,14 @@ set -o pipefail
|
|||||||
|
|
||||||
cd $(dirname "${BASH_SOURCE[0]}")
|
cd $(dirname "${BASH_SOURCE[0]}")
|
||||||
|
|
||||||
# INSTALL_CNI indicates whether to install CNI. CNI installation
|
|
||||||
# makes sense for local testing, but doesn't make sense for cluster
|
|
||||||
# setup, because CNI daemonset is usually used to deploy CNI binaries
|
|
||||||
# and configurations in cluster.
|
|
||||||
INSTALL_CNI=${INSTALL_CNI:-true}
|
|
||||||
|
|
||||||
# INSTALL_CNI indicates whether to install CNI config.
|
|
||||||
INSTALL_CNI_CONFIG=${INSTALL_CNI_CONFIG:-true}
|
|
||||||
|
|
||||||
# Install runc
|
# Install runc
|
||||||
./install-runc.sh
|
./install-runc.sh
|
||||||
|
|
||||||
# Install cni
|
# Install cni
|
||||||
if ${INSTALL_CNI}; then
|
|
||||||
./install-cni.sh
|
./install-cni.sh
|
||||||
fi
|
|
||||||
|
|
||||||
# Install cni config
|
# Install cni config
|
||||||
if ${INSTALL_CNI_CONFIG}; then
|
|
||||||
./install-cni-config.sh
|
./install-cni-config.sh
|
||||||
fi
|
|
||||||
|
|
||||||
# Install containerd
|
# Install containerd
|
||||||
./install-containerd.sh
|
./install-containerd.sh
|
||||||
|
@ -31,6 +31,8 @@ INCLUDE_CNI=${INCLUDE_CNI:-false}
|
|||||||
# CUSTOM_CONTAINERD indicates whether to install customized containerd
|
# CUSTOM_CONTAINERD indicates whether to install customized containerd
|
||||||
# for CI test.
|
# for CI test.
|
||||||
CUSTOM_CONTAINERD=${CUSTOM_CONTAINERD:-false}
|
CUSTOM_CONTAINERD=${CUSTOM_CONTAINERD:-false}
|
||||||
|
# OFFICIAL_RELEASE indicates whether to use official containerd release.
|
||||||
|
OFFICIAL_RELEASE=${OFFICIAL_RELEASE:-false}
|
||||||
|
|
||||||
destdir=${BUILD_DIR}/release-stage
|
destdir=${BUILD_DIR}/release-stage
|
||||||
|
|
||||||
@ -42,9 +44,35 @@ fi
|
|||||||
# Remove release-stage directory to avoid including old files.
|
# Remove release-stage directory to avoid including old files.
|
||||||
rm -rf ${destdir}
|
rm -rf ${destdir}
|
||||||
|
|
||||||
|
# download_containerd downloads containerd from official release.
|
||||||
|
download_containerd() {
|
||||||
|
local -r tmppath="$(mktemp -d /tmp/download-containerd.XXXX)"
|
||||||
|
local -r tarball="${tmppath}/containerd.tar.gz"
|
||||||
|
local -r url="https://github.com/containerd/containerd/releases/download/v${VERSION}/containerd-${VERSION}.linux-amd64.tar.gz"
|
||||||
|
wget -O "${tarball}" "${url}"
|
||||||
|
tar -C "${destdir}/usr/local/bin" -xzf "${tarball}"
|
||||||
|
rm -rf "${tmppath}"
|
||||||
|
}
|
||||||
|
|
||||||
# Install dependencies into release stage.
|
# Install dependencies into release stage.
|
||||||
NOSUDO=true INSTALL_CNI=${INCLUDE_CNI} INSTALL_CNI_CONFIG=false DESTDIR=${destdir} \
|
# Install runc
|
||||||
./hack/install/install-deps.sh
|
NOSUDO=true DESTDIR=${destdir} ./hack/install/install-runc.sh
|
||||||
|
|
||||||
|
if ${INCLUDE_CNI}; then
|
||||||
|
# Install cni
|
||||||
|
NOSUDO=true DESTDIR=${destdir} ./hack/install/install-cni.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install critools
|
||||||
|
NOSUDO=true DESTDIR=${destdir} ./hack/install/install-critools.sh
|
||||||
|
|
||||||
|
# Install containerd
|
||||||
|
if $OFFICIAL_RELEASE; then
|
||||||
|
download_containerd
|
||||||
|
else
|
||||||
|
# Build containerd from source
|
||||||
|
NOSUDO=true DESTDIR=${destdir} ./hack/install/install-containerd.sh
|
||||||
|
fi
|
||||||
|
|
||||||
if ${CUSTOM_CONTAINERD}; then
|
if ${CUSTOM_CONTAINERD}; then
|
||||||
make install -e DESTDIR=${destdir}
|
make install -e DESTDIR=${destdir}
|
||||||
|
Loading…
Reference in New Issue
Block a user