Skip to content

Commit cd75bf2

Browse files
committed
1.53.1.sh: Make sure, notify_push service is updated
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
1 parent bd9d73c commit cd75bf2

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

.github/workflows/build-lxd.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ jobs:
211211
ip="$(lxc list -c n4 -f csv | grep '^ncp' | cut -d ',' -f2)"
212212
ip="${ip/% *}"
213213
echo "${ip} nextcloudpi.local" | sudo tee /etc/hosts
214+
lxc exec ncp -- ncc notify_push:self-test || true
215+
lxc exec ncp -- ncc config:system:get overwrite.cli.url || true
214216
215217
- name: Update ncp
216218
run: |
@@ -230,6 +232,7 @@ jobs:
230232
latest_nc_version="$(cat etc/ncp.cfg | jq -r '.nextcloud_version')"
231233
232234
lxc exec ncp -- bash -c "DBG=x ncp-update ${UPDATE_ARGS[*]}"
235+
sleep 30
233236
lxc exec ncp -- /usr/local/bin/ncc status
234237
235238
if [[ "$current_nc_version" =~ "$latest_nc_version".* ]]
@@ -240,14 +243,12 @@ jobs:
240243
fi
241244
242245
lxc stop ncp
243-
lxc publish -q ncp -f --alias "ncp/updated"
244246
- name: Relaunch container
245247
run: |
246248
set -x
247-
lxc delete -q -f ncp || true
248-
systemd-run --user --scope -p "Delegate=yes" lxc launch -q "ncp/updated" ncp
249+
systemd-run --user --scope -p "Delegate=yes" lxc start ncp
249250
lxc exec ncp -- bash -c 'while [ "$(systemctl is-system-running 2>/dev/null)" != "running" ] && [ "$(systemctl is-system-running 2>/dev/null)" != "degraded" ]; do :; done'
250-
sleep 30
251+
sleep 60
251252
ip="$(lxc list -c n4 -f csv | grep '^ncp' | cut -d ',' -f2)"
252253
ip="${ip/% *}"
253254
echo "${ip} nextcloudpi.local" | sudo tee /etc/hosts
@@ -257,6 +258,8 @@ jobs:
257258
lxc exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
258259
python system_tests.py --non-interactive || {
259260
echo "System test failed!"
261+
lxc exec ncp -- ncc status
262+
lxc exec ncp -- ncc notify_push:self-test
260263
exit 1
261264
}
262265
python nextcloud_tests.py --no-gui "nextcloudpi.local" 443 4443 || {

.github/workflows/vm-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ jobs:
229229
echo "==========================================="
230230
ssh "${SSH_OPTIONS[@]}" "root@${SERVER_ADDRESS}" tail /var/log/ncp.log;
231231
echo "==========================================="
232+
echo "notify_push diag:"
233+
ssh "${SSH_OPTIONS[@]}" "root@${SERVER_ADDRESS}" ncc status
234+
ssh "${SSH_OPTIONS[@]}" "root@${SERVER_ADDRESS}" ncc notify_push:self-test
232235
exit 1
233236
}
234237

updates/1.53.1.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
#!/usr/bin/env bash
2-
set -e
2+
set -ex
33

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

66
install_template apache2/ncp.conf.sh /etc/apache2/sites-available/ncp.conf --defaults
77
a2dissite nextcloud
88
mv /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-available/001-nextcloud.conf
99
a2ensite 001-nextcloud
10-
bash -c "sleep 2 && service apache2 reload" &>/dev/null &
10+
install_template systemd/notify_push.service.sh /etc/systemd/system/notify_push.service
11+
systemctl daemon-reload
12+
url="$(ncc config:system:get overwrite.cli.url)"
13+
bash -c "sleep 2 && systemctl reload apache2 && systemctl restart notify_push && sleep 5 && ncc notify_push:setup '${url}/push'"

0 commit comments

Comments
 (0)