modules/{autoupdate,microvm-host}: let jq fail
This commit is contained in:
parent
844b1d22e6
commit
079784836a
|
@ -28,7 +28,7 @@
|
|||
script = ''
|
||||
OLD=$(readlink /run/current-system)
|
||||
echo Current system: $(basename $OLD)
|
||||
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/${config.networking.hostName}/latest | jq -r .buildoutputs.out.path)
|
||||
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/${config.networking.hostName}/latest | jq -er .buildoutputs.out.path)
|
||||
if [ -z "$NEW" ] || [ "$NEW" = "null" ]; then
|
||||
echo "Unable to obtain updated system"
|
||||
exit 1
|
||||
|
@ -82,7 +82,7 @@
|
|||
|
||||
OLD=$(readlink /run/current-system)
|
||||
echo Current system: $(basename $OLD)
|
||||
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/${config.networking.hostName}/latest | ${pkgs.jq}/bin/jq -r .buildoutputs.out.path)
|
||||
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/${config.networking.hostName}/latest | ${pkgs.jq}/bin/jq -er .buildoutputs.out.path)
|
||||
if [ -z "$NEW" ] || [ "$NEW" = "null" ]; then
|
||||
echo "Unable to obtain updated system"
|
||||
exit 1
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
echo MicroVM $NAME
|
||||
cd /var/lib/microvms/$NAME
|
||||
if [ "$(cat flake)" = "git+https://gitea.c3d2.de/c3d2/nix-config?ref=flake-update" ]; then
|
||||
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/$NAME/latest | ${pkgs.jq}/bin/jq -r .buildoutputs.out.path)
|
||||
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/$NAME/latest | ${pkgs.jq}/bin/jq -er .buildoutputs.out.path)
|
||||
nix copy --from https://nix-serve.hq.c3d2.de $NEW
|
||||
|
||||
if [ -e booted ]; then
|
||||
|
|
Loading…
Reference in New Issue
Block a user