fix pipeline failure for release test
Signed-off-by: Benjamin Wang <wachao@vmware.com>
This commit is contained in:
@ -2,8 +2,11 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
source ./scripts/test_lib.sh
|
||||||
|
|
||||||
VER=$1
|
VER=$1
|
||||||
PROJ="etcd"
|
PROJ="etcd"
|
||||||
|
REPOSITORY="${REPOSITORY:-https://github.com/etcd-io/etcd.git}"
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
echo "Usage: ${0} VERSION" >> /dev/stderr
|
echo "Usage: ${0} VERSION" >> /dev/stderr
|
||||||
@ -17,13 +20,12 @@ function setup_env {
|
|||||||
local ver=${2}
|
local ver=${2}
|
||||||
|
|
||||||
if [ ! -d "${proj}" ]; then
|
if [ ! -d "${proj}" ]; then
|
||||||
git clone https://github.com/etcd-io/"${proj}"
|
log_callout "Cloning ${REPOSITORY}..."
|
||||||
|
git clone "${REPOSITORY}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd "${proj}" >/dev/null
|
pushd "${proj}" >/dev/null
|
||||||
git checkout main
|
|
||||||
git fetch --all
|
git fetch --all
|
||||||
git reset --hard origin/main
|
|
||||||
git checkout "${ver}"
|
git checkout "${ver}"
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
}
|
}
|
||||||
@ -53,7 +55,7 @@ function package {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function main {
|
function main {
|
||||||
mkdir release
|
mkdir -p release
|
||||||
cd release
|
cd release
|
||||||
setup_env "${PROJ}" "${VER}"
|
setup_env "${PROJ}" "${VER}"
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ fi
|
|||||||
ETCD_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
ETCD_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
|
|
||||||
pushd "${ETCD_ROOT}" >/dev/null
|
pushd "${ETCD_ROOT}" >/dev/null
|
||||||
log_callout "Building etcd binary..."
|
log_callout "Building etcd binary in ${REPOSITORY}"
|
||||||
./scripts/build-binary.sh "${VERSION}"
|
./scripts/build-binary.sh "${VERSION}"
|
||||||
|
|
||||||
for TARGET_ARCH in "amd64" "arm64" "ppc64le"; do
|
for TARGET_ARCH in "amd64" "arm64" "ppc64le"; do
|
||||||
|
@ -106,8 +106,9 @@ main() {
|
|||||||
if [[ -n $(git status -s) ]]; then
|
if [[ -n $(git status -s) ]]; then
|
||||||
log_callout "Committing version/version.go update."
|
log_callout "Committing version/version.go update."
|
||||||
git add version/version.go
|
git add version/version.go
|
||||||
|
git diff --staged | cat
|
||||||
git commit --signoff -m "version: bump up to ${VERSION}"
|
git commit --signoff -m "version: bump up to ${VERSION}"
|
||||||
git diff --staged
|
git diff --staged | cat
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Push the version change if it's not already been pushed.
|
# Push the version change if it's not already been pushed.
|
||||||
@ -163,7 +164,7 @@ main() {
|
|||||||
log_callout "Building release..."
|
log_callout "Building release..."
|
||||||
# Check for old and new names of the release build script.
|
# Check for old and new names of the release build script.
|
||||||
# TODO: Move the release script into this on as a function?
|
# TODO: Move the release script into this on as a function?
|
||||||
./scripts/build-release.sh "${RELEASE_VERSION}"
|
REPOSITORY=$(pwd) ./scripts/build-release.sh "${RELEASE_VERSION}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Sanity checks.
|
# Sanity checks.
|
||||||
|
Reference in New Issue
Block a user