test-upgrade with v1 -> v2
All checks were successful
ci/woodpecker/push/debug Pipeline was successful
ci/woodpecker/pr/debug Pipeline was successful
ci/woodpecker/deployment/debug Pipeline was successful
ci/woodpecker/deployment/release/3 Pipeline was successful
ci/woodpecker/deployment/release/2 Pipeline was successful
ci/woodpecker/deployment/release/1 Pipeline was successful
ci/woodpecker/deployment/release/4 Pipeline was successful
ci/woodpecker/deployment/publish Pipeline was successful
All checks were successful
ci/woodpecker/push/debug Pipeline was successful
ci/woodpecker/pr/debug Pipeline was successful
ci/woodpecker/deployment/debug Pipeline was successful
ci/woodpecker/deployment/release/3 Pipeline was successful
ci/woodpecker/deployment/release/2 Pipeline was successful
ci/woodpecker/deployment/release/1 Pipeline was successful
ci/woodpecker/deployment/release/4 Pipeline was successful
ci/woodpecker/deployment/publish Pipeline was successful
This commit is contained in:
parent
f7d9c2b383
commit
9c745548c4
4 changed files with 25 additions and 8 deletions
|
@ -35,7 +35,15 @@ steps:
|
||||||
- matrix:
|
- matrix:
|
||||||
ARCH: i386
|
ARCH: i386
|
||||||
|
|
||||||
- name: upgrade tests
|
- name: upgrade tests from v1.0.0
|
||||||
|
image: nixpkgs/nix:nixos-22.05
|
||||||
|
commands:
|
||||||
|
- nix-shell --attr ci --run "./script/test-upgrade.sh v1.0.0 x86_64-unknown-linux-musl" || (cat /tmp/garage.log; false)
|
||||||
|
when:
|
||||||
|
- matrix:
|
||||||
|
ARCH: amd64
|
||||||
|
|
||||||
|
- name: upgrade tests from v0.8.4
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
commands:
|
commands:
|
||||||
- nix-shell --attr ci --run "./script/test-upgrade.sh v0.8.4 x86_64-unknown-linux-musl" || (cat /tmp/garage.log; false)
|
- nix-shell --attr ci --run "./script/test-upgrade.sh v0.8.4 x86_64-unknown-linux-musl" || (cat /tmp/garage.log; false)
|
||||||
|
|
|
@ -17,13 +17,19 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$GARAGE_BIN -c /tmp/config.1.toml bucket create eprouvette
|
$GARAGE_BIN -c /tmp/config.1.toml bucket create eprouvette
|
||||||
if [ "$GARAGE_08" = "1" ]; then
|
if [ "$GARAGE_OLDVER" = "v08" ]; then
|
||||||
KEY_INFO=$($GARAGE_BIN -c /tmp/config.1.toml key new --name opérateur)
|
KEY_INFO=$($GARAGE_BIN -c /tmp/config.1.toml key new --name opérateur)
|
||||||
else
|
ACCESS_KEY=`echo $KEY_INFO|grep -Po 'GK[a-f0-9]+'`
|
||||||
|
SECRET_KEY=`echo $KEY_INFO|grep -Po 'Secret key: [a-f0-9]+'|grep -Po '[a-f0-9]+$'`
|
||||||
|
elif [ "$GARAGE_OLDVER" = "v1" ]; then
|
||||||
KEY_INFO=$($GARAGE_BIN -c /tmp/config.1.toml key create opérateur)
|
KEY_INFO=$($GARAGE_BIN -c /tmp/config.1.toml key create opérateur)
|
||||||
|
ACCESS_KEY=`echo $KEY_INFO|grep -Po 'GK[a-f0-9]+'`
|
||||||
|
SECRET_KEY=`echo $KEY_INFO|grep -Po 'Secret key: [a-f0-9]+'|grep -Po '[a-f0-9]+$'`
|
||||||
|
else
|
||||||
|
KEY_INFO=$($GARAGE_BIN -c /tmp/config.1.toml json-api CreateKey '{"name":"opérateur"}')
|
||||||
|
ACCESS_KEY=`echo $KEY_INFO|jq -r .accessKeyId`
|
||||||
|
SECRET_KEY=`echo $KEY_INFO|jq -r .secretAccessKey`
|
||||||
fi
|
fi
|
||||||
ACCESS_KEY=`echo $KEY_INFO|grep -Po 'GK[a-f0-9]+'`
|
|
||||||
SECRET_KEY=`echo $KEY_INFO|grep -Po 'Secret key: [a-f0-9]+'|grep -Po '[a-f0-9]+$'`
|
|
||||||
$GARAGE_BIN -c /tmp/config.1.toml bucket allow eprouvette --read --write --owner --key $ACCESS_KEY
|
$GARAGE_BIN -c /tmp/config.1.toml bucket allow eprouvette --read --write --owner --key $ACCESS_KEY
|
||||||
echo "$ACCESS_KEY $SECRET_KEY" > /tmp/garage.s3
|
echo "$ACCESS_KEY $SECRET_KEY" > /tmp/garage.s3
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ until $GARAGE_BIN -c /tmp/config.1.toml status 2>&1|grep -q HEALTHY ; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$GARAGE_08" = "1" ]; then
|
if [ "$GARAGE_OLDVER" = "v08" ]; then
|
||||||
$GARAGE_BIN -c /tmp/config.1.toml status \
|
$GARAGE_BIN -c /tmp/config.1.toml status \
|
||||||
| grep 'NO ROLE' \
|
| grep 'NO ROLE' \
|
||||||
| grep -Po '^[0-9a-f]+' \
|
| grep -Po '^[0-9a-f]+' \
|
||||||
|
|
|
@ -24,7 +24,10 @@ echo "============= insert data into old version cluster ================="
|
||||||
export GARAGE_BIN=/tmp/old_garage
|
export GARAGE_BIN=/tmp/old_garage
|
||||||
if echo $OLD_VERSION | grep 'v0\.8\.'; then
|
if echo $OLD_VERSION | grep 'v0\.8\.'; then
|
||||||
echo "Detected Garage v0.8.x"
|
echo "Detected Garage v0.8.x"
|
||||||
export GARAGE_08=1
|
export GARAGE_OLDVER=v08
|
||||||
|
elif (echo $OLD_VERSION | grep 'v0\.9\.') || (echo $OLD_VERSION | grep 'v1\.'); then
|
||||||
|
echo "Detected Garage v0.9.x / v1.x"
|
||||||
|
export GARAGE_OLDVER=v1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "⏳ Setup cluster using old version"
|
echo "⏳ Setup cluster using old version"
|
||||||
|
@ -47,7 +50,7 @@ killall -9 old_garage || true
|
||||||
echo "🏁 Removing old garage version"
|
echo "🏁 Removing old garage version"
|
||||||
rm -rv $GARAGE_BIN
|
rm -rv $GARAGE_BIN
|
||||||
export -n GARAGE_BIN
|
export -n GARAGE_BIN
|
||||||
export -n GARAGE_08
|
export -n GARAGE_OLDVER
|
||||||
|
|
||||||
echo "================ read data from new cluster ==================="
|
echo "================ read data from new cluster ==================="
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue