Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Honeypot
nixfiles
Commits
3643b561
Verified
Commit
3643b561
authored
Sep 26, 2021
by
Matthias Adamczyk
Browse files
Add Gitlab CI config
parent
a53ae681
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
3643b561
stages
:
-
setup
-
triggers
# Since the gitlab-ci.yml format is relatively limited, we generate the nixos-rebuild jobs as a child pipeline
# See https://about.gitlab.com/blog/2020/04/24/parent-child-pipelines/ for more info on child pipelines
generate-nixos-pipeline
:
stage
:
setup
tags
:
-
operations-nix
script
:
-
nix-build .nixos-gitlab-ci.yml.nix
-
cp result .nixos-gitlab-ci.yml
artifacts
:
paths
:
-
.nixos-gitlab-ci.yml
nixos
:
stage
:
triggers
needs
:
-
generate-nixos-pipeline
trigger
:
include
:
-
artifact
:
.nixos-gitlab-ci.yml
job
:
generate-nixos-pipeline
strategy
:
depend
editorconfig
:
stage
:
triggers
needs
:
[]
tags
:
-
operations-nix
script
:
-
nix-shell -p editorconfig-checker --run editorconfig-checker -I nixpkgs=channel:nixos-unstable
iso_image
:
stage
:
triggers
needs
:
[]
tags
:
-
operations-nix
script
:
-
nix-build -A isoImage
artifacts
:
paths
:
-
result/*
kexec_tarball
:
stage
:
triggers
needs
:
[]
tags
:
-
operations-nix
script
:
-
nix-build -A kexec_tarball
artifacts
:
paths
:
-
result/*
.nixos-gitlab-ci.nix
0 → 100644
View file @
3643b561
let
inherit
(
import
./.
)
hosts
pkgs
lib
;
jobs
=
lib
.
mapAttrs
(
name
:
host
:
{
stage
=
"build"
;
tags
=
[
"operations-nix"
];
variables
.
GIT_DEPTH
=
0
;
script
=
[
"nix-build --show-trace --pure-eval --option allow-import-from-derivation false --expr
\"
( (import (fetchGit { url = ./.; rev =
\\\"
$(git describe --always --abbrev=0)
\\\"
; })).deploy.
${
name
}
)
\"
"
];
}
)
(
lib
.
filterAttrs
(
name
:
host
:
!
host
.
config
.
skipCI
)
hosts
);
in
pkgs
.
writeText
"nixos-gitlab-ci.yml"
(
builtins
.
toJSON
jobs
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment