Down containerd binaries from official release.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
		@@ -19,9 +19,9 @@ Publish the release tarball `cri-containerd-${CONTAINERD_VERSION}.${OS}-${ARCH}.
 | 
			
		||||
git checkout ${RELEASE_VERSION}
 | 
			
		||||
 | 
			
		||||
# 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.
 | 
			
		||||
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
 | 
			
		||||
 
 | 
			
		||||
@@ -28,27 +28,14 @@ set -o pipefail
 | 
			
		||||
 | 
			
		||||
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.sh
 | 
			
		||||
 | 
			
		||||
# Install cni
 | 
			
		||||
if ${INSTALL_CNI}; then
 | 
			
		||||
  ./install-cni.sh
 | 
			
		||||
fi
 | 
			
		||||
./install-cni.sh
 | 
			
		||||
 | 
			
		||||
# Install cni config
 | 
			
		||||
if ${INSTALL_CNI_CONFIG}; then
 | 
			
		||||
  ./install-cni-config.sh
 | 
			
		||||
fi
 | 
			
		||||
./install-cni-config.sh
 | 
			
		||||
 | 
			
		||||
# Install containerd
 | 
			
		||||
./install-containerd.sh
 | 
			
		||||
 
 | 
			
		||||
@@ -31,6 +31,8 @@ INCLUDE_CNI=${INCLUDE_CNI:-false}
 | 
			
		||||
# CUSTOM_CONTAINERD indicates whether to install customized containerd
 | 
			
		||||
# for CI test.
 | 
			
		||||
CUSTOM_CONTAINERD=${CUSTOM_CONTAINERD:-false}
 | 
			
		||||
# OFFICIAL_RELEASE indicates whether to use official containerd release.
 | 
			
		||||
OFFICIAL_RELEASE=${OFFICIAL_RELEASE:-false}
 | 
			
		||||
 | 
			
		||||
destdir=${BUILD_DIR}/release-stage
 | 
			
		||||
 | 
			
		||||
@@ -42,9 +44,35 @@ fi
 | 
			
		||||
# Remove release-stage directory to avoid including old files.
 | 
			
		||||
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.
 | 
			
		||||
NOSUDO=true INSTALL_CNI=${INCLUDE_CNI} INSTALL_CNI_CONFIG=false DESTDIR=${destdir} \
 | 
			
		||||
  ./hack/install/install-deps.sh
 | 
			
		||||
# Install runc
 | 
			
		||||
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
 | 
			
		||||
  make install -e DESTDIR=${destdir}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user