upgrades: gitea 1.21.10 -> forgejo 7.0.0
This commit is contained in:
parent
e9bb6f67e6
commit
3bd723d6b8
3 changed files with 56 additions and 2 deletions
11
lib/lib.sh
11
lib/lib.sh
|
@ -153,14 +153,21 @@ function start_forgejo() {
|
||||||
local version=$1
|
local version=$1
|
||||||
|
|
||||||
download $version
|
download $version
|
||||||
|
start_forgejo_daemon $version $DIR_BINARIES/forgejo-$version
|
||||||
|
}
|
||||||
|
|
||||||
|
function start_forgejo_daemon() {
|
||||||
|
local version=$1
|
||||||
|
local binary=$2
|
||||||
|
|
||||||
local work_path=$DIR/forgejo-work-path
|
local work_path=$DIR/forgejo-work-path
|
||||||
daemon --chdir=$DIR --unsafe --env="TERM=$TERM" --env="HOME=$HOME" --env="PATH=$PATH" --pidfile=$DIR/forgejo-pid --errlog=$DIR/forgejo-err.log --output=$DIR/forgejo-out.log -- $DIR_BINARIES/forgejo-$version --config $work_path/app.ini --work-path $work_path
|
daemon --chdir=$DIR --unsafe --env="TERM=$TERM" --env="HOME=$HOME" --env="PATH=$PATH" --pidfile=$DIR/forgejo-pid --errlog=$DIR/forgejo-err.log --output=$DIR/forgejo-out.log -- $binary --config $work_path/app.ini --work-path $work_path
|
||||||
if ! retry grep --no-messages --quiet 'Starting server on' $work_path/log/forgejo.log ; then
|
if ! retry grep --no-messages --quiet 'Starting server on' $work_path/log/forgejo.log ; then
|
||||||
grep '' $DIR/*.log
|
grep '' $DIR/*.log
|
||||||
grep '' $work_path/log/*.log 2> /dev/null
|
grep '' $work_path/log/*.log 2> /dev/null
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
echo "$DIR_BINARIES/forgejo-$version --config $work_path/app.ini --work-path $work_path" '"$@"' > $DIR/forgejocli
|
echo "$binary --config $work_path/app.ini --work-path $work_path" '"$@"' > $DIR/forgejocli
|
||||||
chmod +x $DIR/forgejocli
|
chmod +x $DIR/forgejocli
|
||||||
create_user_and_login $version
|
create_user_and_login $version
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,9 @@ SSH_LISTEN_PORT = 2222
|
||||||
LFS_START_SERVER = true
|
LFS_START_SERVER = true
|
||||||
ENABLE_PPROF = true
|
ENABLE_PPROF = true
|
||||||
|
|
||||||
|
[repository]
|
||||||
|
ROOT = ${WORK_PATH}/data/forgejo-repositories
|
||||||
|
|
||||||
[queue]
|
[queue]
|
||||||
TYPE = immediate
|
TYPE = immediate
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,49 @@ function test_successful_upgrades() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function download_gitea() {
|
||||||
|
local version=$1
|
||||||
|
|
||||||
|
if ! test -f $DIR_BINARIES/gitea-$version ; then
|
||||||
|
mkdir -p $DIR_BINARIES
|
||||||
|
wget -O $DIR_BINARIES/gitea-$version --quiet https://dl.gitea.com/gitea/$version/gitea-$version-linux-amd64
|
||||||
|
chmod +x $DIR_BINARIES/gitea-$version
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function start_gitea() {
|
||||||
|
local version=$1
|
||||||
|
|
||||||
|
download_gitea $version
|
||||||
|
start_forgejo_daemon $version $DIR_BINARIES/gitea-$version
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_gitea_upgrades() {
|
||||||
|
stop
|
||||||
|
for config in default ; do
|
||||||
|
log_info "using $config app.ini"
|
||||||
|
upgrade_reset $config
|
||||||
|
|
||||||
|
version=1.21.10
|
||||||
|
log_info "run gitea $version"
|
||||||
|
cleanup_storage
|
||||||
|
start_s3 minio
|
||||||
|
start_gitea $version
|
||||||
|
fixture_create
|
||||||
|
fixture_assert
|
||||||
|
doctor_run $version
|
||||||
|
|
||||||
|
for version in 7.0-test ; do
|
||||||
|
stop
|
||||||
|
log_info "run forgejo $version"
|
||||||
|
start $version
|
||||||
|
verify_storage
|
||||||
|
fixture_assert
|
||||||
|
doctor_run $version
|
||||||
|
done
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
source $UPGRADE_DIR/test-upgrade-forgejo-database-v3.sh
|
source $UPGRADE_DIR/test-upgrade-forgejo-database-v3.sh
|
||||||
source $UPGRADE_DIR/test-pprof-upload.sh
|
source $UPGRADE_DIR/test-pprof-upload.sh
|
||||||
|
|
||||||
|
@ -59,4 +102,5 @@ function test_upgrades() {
|
||||||
run test_successful_upgrades
|
run test_successful_upgrades
|
||||||
run test_forgejo_database_v3_upgrades
|
run test_forgejo_database_v3_upgrades
|
||||||
run test_forgejo_pprof
|
run test_forgejo_pprof
|
||||||
|
run test_gitea_upgrades
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue