Merge pull request #667 from GLYASAI/V5.1

build grctl enterprise
This commit is contained in:
barnettZQG 2020-02-13 08:55:57 +08:00 committed by GitHub
commit eaecd2494b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,7 +40,7 @@ build::node() {
echo "build node" echo "build node"
docker run --rm -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc} -X github.com/goodrain/rainbond/util/license.enterprise=${ENTERPRISE}" -o $releasedir/dist/usr/local/bin/node ./cmd/node docker run --rm -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc} -X github.com/goodrain/rainbond/util/license.enterprise=${ENTERPRISE}" -o $releasedir/dist/usr/local/bin/node ./cmd/node
;; ;;
grctl) grctl)
echo "build grctl" echo "build grctl"
docker run --rm -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc}" -o $releasedir/dist/usr/local/bin/grctl ./cmd/grctl docker run --rm -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc}" -o $releasedir/dist/usr/local/bin/grctl ./cmd/grctl
;; ;;
@ -51,8 +51,13 @@ build::node() {
*) *)
echo "build node" echo "build node"
docker run --rm -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc} -X github.com/goodrain/rainbond/util/license.enterprise=${ENTERPRISE}" -o $releasedir/dist/usr/local/bin/node ./cmd/node docker run --rm -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc} -X github.com/goodrain/rainbond/util/license.enterprise=${ENTERPRISE}" -o $releasedir/dist/usr/local/bin/node ./cmd/node
echo "build grctl" if [ "${ENTERPRISE}" = "true" ];then
docker run --rm -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc}" -o $releasedir/dist/usr/local/bin/grctl ./cmd/grctl echo "build grctl enterprise"
docker run --rm -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc} -X github.com/goodrain/rainbond/util/license.enterprise=${ENTERPRISE}" -o $releasedir/dist/usr/local/bin/grctl ./cmd/grctl
else
echo "build grctl"
docker run --rm -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc}" -o $releasedir/dist/usr/local/bin/grctl ./cmd/grctl
fi
echo "build certutil" echo "build certutil"
docker run --rm -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc}" -o $releasedir/dist/usr/local/bin/grcert ./cmd/certutil docker run --rm -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc}" -o $releasedir/dist/usr/local/bin/grcert ./cmd/certutil
pushd $distdir pushd $distdir
@ -64,7 +69,7 @@ COPY pkg.tgz /
EOF EOF
docker build -t ${BASE_NAME}/cni:rbd_$VERSION . docker build -t ${BASE_NAME}/cni:rbd_$VERSION .
if [ "$1" = "push" ];then if [ "$1" = "push" ];then
docker push ${BASE_NAME}/cni:rbd_$VERSION docker push ${BASE_NAME}/cni:rbd_$VERSION
fi fi
popd popd
;; ;;