Skip to content

Commit dd64126

Browse files
committed
build-lxd.yml: Fix nc-update test
1 parent ef1bdd4 commit dd64126

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

.github/workflows/build-lxd.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ jobs:
267267
set -x
268268
export GECKODRIVER_PATH="$GECKODRIVER_PATH"
269269
export FF_BINARY_PATH="$(which firefox)"
270-
sudo "$LXC" exec ncp -- /usr/local/bin/ncc config:system:set overwrite.cli.url --value "https://nextcloudpi.local"
270+
#sudo "$LXC" exec ncp -- /usr/local/bin/ncc config:system:set overwrite.cli.url --value "https://nextcloudpi.local"
271271
sudo "$LXC" exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
272272
../.venv/bin/python activation_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
273273
echo "Activation test failed!"
@@ -295,7 +295,7 @@ jobs:
295295
sudo "$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
296296
exit 1
297297
}
298-
USE_INCUS="$USE_INCUS" python system_tests.py --non-interactive --skip-update-test || {
298+
USE_INCUS="$USE_INCUS" ../.venv/bin/python system_tests.py --non-interactive --skip-update-test || {
299299
echo "System test failed!"
300300
exit 1
301301
}
@@ -324,7 +324,7 @@ jobs:
324324
latest_build="${latest_nc_version#*.}"
325325
latest_build="${latest_build#*.}"
326326
327-
if [[ "$current_nc_version" =~ ^[0-9]*\\.[0-9]*\\.[0-9]*\\.[0-9]*$ ]]
327+
if [[ "$current_nc_version" =~ ^[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*$ ]]
328328
then
329329
current_nc_version="${current_nc_version%.*}"
330330
fi
@@ -638,7 +638,17 @@ jobs:
638638
sudo "$LXC" exec ncp -- bash -c "DEBIAN_FRONTEND=noninteractive ncp-dist-upgrade"
639639
sudo "$LXC" exec ncp -- /usr/local/bin/ncc status
640640
641-
if [[ "$current_nc_version" =~ "$latest_nc_version".* ]]
641+
latest_build="${latest_nc_version#*.}"
642+
latest_build="${latest_build#*.}"
643+
644+
if [[ "$current_nc_version" =~ ^[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*$ ]]
645+
then
646+
current_nc_version="${current_nc_version%.*}"
647+
fi
648+
current_build="${current_nc_version#*.}"
649+
current_build="${current_build#*.}"
650+
651+
if [[ "${current_nc_version%.*}" == "${latest_nc_version%.*}" ]] && [[ "${current_build}" -ge "${latest_build}" ]]
642652
then
643653
echo "Nextcloud is up to date - skipping NC update test."
644654
else

bin/nextcloud-domain.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
source /usr/local/etc/library.sh
44

5+
set -x
56
# wait until user decrypts the instance first
67
while :; do
78
needs_decrypt || break
@@ -31,6 +32,8 @@ while :; do
3132
sleep 3
3233
continue
3334
}
35+
# TODO: REmove debug output
36+
echo "found domain: $nc_domain"
3437
# Fix the situation where junk was introduced in the config by mistake
3538
# because Redis was not yet ready to be used even if it was up
3639
[[ "${nc_domain}" =~ "RedisException" ]] && nc_domain="$(hostname)"

0 commit comments

Comments
 (0)