Add staging tar for node e2e.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
parent
e77795b968
commit
2449ffdc42
@ -81,4 +81,6 @@ jobs:
|
|||||||
script:
|
script:
|
||||||
- test "${TRAVIS_PULL_REQUEST}" != "false" && exit 0 || true
|
- test "${TRAVIS_PULL_REQUEST}" != "false" && exit 0 || true
|
||||||
- make push
|
- make push
|
||||||
|
# Build a tarball including CNI for node e2e.
|
||||||
|
- PUSH_VERSION=true make push TARBALL_PREFIX=cri-containerd-node-e2e INCLUDE_CNI=true
|
||||||
go: 1.8.x
|
go: 1.8.x
|
||||||
|
5
Makefile
5
Makefile
@ -23,7 +23,8 @@ BUILD_DIR := _output
|
|||||||
VERSION := $(shell git describe --tags --dirty)
|
VERSION := $(shell git describe --tags --dirty)
|
||||||
# strip the first char of the tag if it's a `v`
|
# strip the first char of the tag if it's a `v`
|
||||||
VERSION := $(VERSION:v%=%)
|
VERSION := $(VERSION:v%=%)
|
||||||
TARBALL := cri-containerd-$(VERSION).tar.gz
|
TARBALL_PREFIX := cri-containerd
|
||||||
|
TARBALL := $(TARBALL_PREFIX)-$(VERSION).tar.gz
|
||||||
BUILD_TAGS := seccomp apparmor
|
BUILD_TAGS := seccomp apparmor
|
||||||
GO_LDFLAGS := -X $(PROJECT)/pkg/version.criContainerdVersion=$(VERSION)
|
GO_LDFLAGS := -X $(PROJECT)/pkg/version.criContainerdVersion=$(VERSION)
|
||||||
SOURCES := $(shell find cmd/ pkg/ vendor/ -name '*.go')
|
SOURCES := $(shell find cmd/ pkg/ vendor/ -name '*.go')
|
||||||
@ -114,7 +115,7 @@ $(BUILD_DIR)/$(TARBALL): $(BUILD_DIR)/cri-containerd hack/versions
|
|||||||
release: $(BUILD_DIR)/$(TARBALL)
|
release: $(BUILD_DIR)/$(TARBALL)
|
||||||
|
|
||||||
push: $(BUILD_DIR)/$(TARBALL)
|
push: $(BUILD_DIR)/$(TARBALL)
|
||||||
@BUILD_DIR=$(BUILD_DIR) TARBALL=$(TARBALL) ./hack/push.sh
|
@BUILD_DIR=$(BUILD_DIR) TARBALL=$(TARBALL) VERSION=$(VERSION) ./hack/push.sh
|
||||||
|
|
||||||
.PHONY: install.deps
|
.PHONY: install.deps
|
||||||
|
|
||||||
|
13
hack/push.sh
13
hack/push.sh
@ -23,6 +23,9 @@ source $(dirname "${BASH_SOURCE[0]}")/test-utils.sh
|
|||||||
DEPLOY_BUCKET=${DEPLOY_BUCKET:-"cri-containerd-staging"}
|
DEPLOY_BUCKET=${DEPLOY_BUCKET:-"cri-containerd-staging"}
|
||||||
BUILD_DIR=${BUILD_DIR:-"_output"}
|
BUILD_DIR=${BUILD_DIR:-"_output"}
|
||||||
TARBALL=${TARBALL:-"cri-containerd.tar.gz"}
|
TARBALL=${TARBALL:-"cri-containerd.tar.gz"}
|
||||||
|
LATEST=${LATEST:-"latest"}
|
||||||
|
# PUSH_VERSION indicates whether to push version.
|
||||||
|
PUSH_VERSION=${PUSH_VERSION:-false}
|
||||||
|
|
||||||
release_tar=${ROOT}/${BUILD_DIR}/${TARBALL}
|
release_tar=${ROOT}/${BUILD_DIR}/${TARBALL}
|
||||||
if [ ! -e ${release_tar} ]; then
|
if [ ! -e ${release_tar} ]; then
|
||||||
@ -38,3 +41,13 @@ fi
|
|||||||
gsutil cp ${release_tar} "gs://${DEPLOY_BUCKET}/"
|
gsutil cp ${release_tar} "gs://${DEPLOY_BUCKET}/"
|
||||||
echo "Release tarball is uploaded to:
|
echo "Release tarball is uploaded to:
|
||||||
https://storage.googleapis.com/${DEPLOY_BUCKET}/${TARBALL}"
|
https://storage.googleapis.com/${DEPLOY_BUCKET}/${TARBALL}"
|
||||||
|
|
||||||
|
if ${PUSH_VERSION}; then
|
||||||
|
if [[ -z "${VERSION}" ]]; then
|
||||||
|
echo "VERSION is not set"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo ${VERSION} | gsutil cp - "gs://${DEPLOY_BUCKET}/${LATEST}"
|
||||||
|
echo "Latest version is uploaded to:
|
||||||
|
https://storage.googleapis.com/${DEPLOY_BUCKET}/${LATEST}"
|
||||||
|
fi
|
||||||
|
@ -25,11 +25,14 @@ cd ${ROOT}
|
|||||||
# TARBALL is the name of the release tar.
|
# TARBALL is the name of the release tar.
|
||||||
BUILD_DIR=${BUILD_DIR:-"_output"}
|
BUILD_DIR=${BUILD_DIR:-"_output"}
|
||||||
TARBALL=${TARBALL:-"cri-containerd.tar.gz"}
|
TARBALL=${TARBALL:-"cri-containerd.tar.gz"}
|
||||||
|
# INCLUDE_CNI indicates whether to install CNI. By default don't
|
||||||
|
# include CNI in release tarball.
|
||||||
|
INCLUDE_CNI=${INCLUDE_CNI:-false}
|
||||||
|
|
||||||
destdir=${BUILD_DIR}/release-stage
|
destdir=${BUILD_DIR}/release-stage
|
||||||
|
|
||||||
# Install dependencies into release stage.
|
# Install dependencies into release stage.
|
||||||
NOSUDO=true INSTALL_CNI=false DESTDIR=${destdir} ./hack/install-deps.sh
|
NOSUDO=true INSTALL_CNI=${INCLUDE_CNI} DESTDIR=${destdir} ./hack/install-deps.sh
|
||||||
|
|
||||||
# Install cri-containerd into release stage.
|
# Install cri-containerd into release stage.
|
||||||
make install -e DESTDIR=${destdir}
|
make install -e DESTDIR=${destdir}
|
||||||
|
Loading…
Reference in New Issue
Block a user