mirror of
https://github.com/nix-community/nixos-generators.git
synced 2024-11-22 01:52:05 +03:00
CI: add nixos-generate logging output assertions
Namely, assert that the last line of output refers to a store path that is a file or symlink to a file.
This commit is contained in:
parent
3cf3032e81
commit
70b4350553
@ -22,6 +22,9 @@ stages:
|
|||||||
- mkdir $uploadPath
|
- mkdir $uploadPath
|
||||||
script:
|
script:
|
||||||
- nix-shell --command './nixos-generate -f $formats -I nixpkgs=channel:nixos-$nixpkgs_ver' |& tee $uploadPath/build.log
|
- nix-shell --command './nixos-generate -f $formats -I nixpkgs=channel:nixos-$nixpkgs_ver' |& tee $uploadPath/build.log
|
||||||
|
# Last line of output should be the path of a regular file (or symlink
|
||||||
|
# to a regular file) in the Nix store.
|
||||||
|
- storePath=$(tail -n 1 $uploadPath/build.log) && test -f "$storePath" && test "/nix/store/${storePath#/nix/store/}" = "$storePath"
|
||||||
- mv $(realpath result) $uploadPath
|
- mv $(realpath result) $uploadPath
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "$uploadPath"
|
name: "$uploadPath"
|
||||||
|
Loading…
Reference in New Issue
Block a user