2019-12-01 23:12:02 +03:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
|
2019-12-04 00:42:50 +03:00
|
|
|
.tar_option:
|
|
|
|
after_script:
|
2019-12-05 02:44:55 +03:00
|
|
|
- tar -cvhf $uploadPath.tar ./$uploadPath
|
2019-12-04 00:42:50 +03:00
|
|
|
artifacts:
|
|
|
|
name: "$uploadPath"
|
|
|
|
paths:
|
2019-12-05 02:44:55 +03:00
|
|
|
- $uploadPath.tar
|
2019-12-01 23:12:02 +03:00
|
|
|
|
|
|
|
.template:
|
|
|
|
only:
|
|
|
|
- web
|
|
|
|
stage: build
|
2019-12-04 00:42:50 +03:00
|
|
|
image: lnl7/nix:latest
|
2019-12-01 23:12:02 +03:00
|
|
|
before_script:
|
|
|
|
- nix --version
|
|
|
|
- chmod +w /etc/nix/nix.conf
|
|
|
|
- echo "system-features = kvm" >> /etc/nix/nix.conf
|
2019-12-04 00:42:50 +03:00
|
|
|
- sed -i -e 's/ --no-out-link//g' nixos-generate
|
|
|
|
- mkdir $uploadPath
|
2019-12-01 23:12:02 +03:00
|
|
|
script:
|
2019-12-04 00:42:50 +03:00
|
|
|
- nix-shell --command './nixos-generate -f $formats -I nixpkgs=channel:nixos-$nixpkgs_ver' |& tee $uploadPath/build.log
|
2022-05-13 18:45:22 +03:00
|
|
|
# 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"
|
2019-12-04 00:42:50 +03:00
|
|
|
- mv $(realpath result) $uploadPath
|
2019-12-01 23:12:02 +03:00
|
|
|
artifacts:
|
2019-12-04 00:42:50 +03:00
|
|
|
name: "$uploadPath"
|
2019-12-01 23:12:02 +03:00
|
|
|
paths:
|
2019-12-05 02:44:55 +03:00
|
|
|
- $uploadPath
|