ci: freebsd: stop postgres instance on failure, to prevent log upload failures
authorAndres Freund <[email protected]>
Mon, 6 Feb 2023 23:41:38 +0000 (15:41 -0800)
committerAndres Freund <[email protected]>
Mon, 6 Feb 2023 23:41:38 +0000 (15:41 -0800)
Discussion: https://postgr.es/m/20230205233057[email protected]
Discussion: https://postgr.es/m/20230206221422[email protected]

.cirrus.yml

index 1204824d2eb795958248e713110e87532a6f4461..f2129787529d723f1bfe748e1f7332beac57856c 100644 (file)
@@ -211,6 +211,12 @@ task:
     EOF
 
   on_failure:
+    # if the server continues running, it often causes cirrus-ci to fail
+    # during upload, as it doesn't expect artifacts to change size
+    stop_running_script: |
+      su postgres <<-EOF
+        build/tmp_install/usr/local/pgsql/bin/pg_ctl -D build/runningcheck stop || true
+      EOF
     <<: *on_failure_meson
     cores_script: src/tools/ci/cores_backtrace.sh freebsd /tmp/cores