-
-
Notifications
You must be signed in to change notification settings - Fork 146
/
.included.yml
32 lines (30 loc) · 1021 Bytes
/
.included.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
stages:
- build
.tar_option:
after_script:
- tar -cvhf $uploadPath.tar ./$uploadPath
artifacts:
name: "$uploadPath"
paths:
- $uploadPath.tar
.template:
only:
- web
stage: build
image: lnl7/nix:latest
before_script:
- nix --version
- chmod +w /etc/nix/nix.conf
- echo "system-features = kvm" >> /etc/nix/nix.conf
- sed -i -e 's/ --no-out-link//g' nixos-generate
- mkdir $uploadPath
script:
- 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
artifacts:
name: "$uploadPath"
paths:
- $uploadPath