summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-08-07 09:54:10 +0200
committertv <tv@krebsco.de>2016-08-07 09:54:10 +0200
commit3288d6848f774e00a5fbc2ba060f2df695af8e55 (patch)
tree971a8ae4fd7b64d2c5b9374d6707d7dc2bb79beb /shared
parent3a760096f6b3b49d4bf32465c860ccfd23d174fa (diff)
parentcbf66556afed7220bc95d1716f06cede5a7a8b09 (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'shared')
-rw-r--r--shared/1systems/test-arch.nix1
-rw-r--r--shared/1systems/test-centos6.nix1
-rw-r--r--shared/1systems/test-centos7.nix1
-rw-r--r--shared/1systems/wolf.nix1
-rw-r--r--shared/2configs/default.nix (renamed from shared/2configs/base.nix)9
-rw-r--r--shared/2configs/shared-buildbot.nix49
-rw-r--r--shared/6tests/data/secrets/grafana_security.nix1
-rw-r--r--shared/6tests/data/secrets/retiolum.rsa_key.priv0
-rw-r--r--shared/6tests/data/secrets/ssh.id_ed255190
-rw-r--r--shared/default.nix1
10 files changed, 28 insertions, 36 deletions
diff --git a/shared/1systems/test-arch.nix b/shared/1systems/test-arch.nix
index 14fc0384b..a13fea425 100644
--- a/shared/1systems/test-arch.nix
+++ b/shared/1systems/test-arch.nix
@@ -3,7 +3,6 @@
{
imports = [
../.
- ../2configs/base.nix
{
boot.loader.grub = {
device = "/dev/sda";
diff --git a/shared/1systems/test-centos6.nix b/shared/1systems/test-centos6.nix
index 8add0b7c1..ebcece383 100644
--- a/shared/1systems/test-centos6.nix
+++ b/shared/1systems/test-centos6.nix
@@ -8,7 +8,6 @@ let
in {
imports = [
../.
- ../2configs/base.nix
../2configs/os-templates/CAC-CentOS-6.5-64bit.nix
{
networking.interfaces.enp11s0.ip4 = [
diff --git a/shared/1systems/test-centos7.nix b/shared/1systems/test-centos7.nix
index 65daff509..9ea063c9b 100644
--- a/shared/1systems/test-centos7.nix
+++ b/shared/1systems/test-centos7.nix
@@ -6,7 +6,6 @@ let
in {
imports = [
../.
- ../2configs/base.nix
../2configs/os-templates/CAC-CentOS-7-64bit.nix
../2configs/temp/networking.nix
../2configs/temp/dirs.nix
diff --git a/shared/1systems/wolf.nix b/shared/1systems/wolf.nix
index 3818cf2c5..8b0976537 100644
--- a/shared/1systems/wolf.nix
+++ b/shared/1systems/wolf.nix
@@ -7,7 +7,6 @@ in
{
imports = [
../.
- ../2configs/base.nix
<nixpkgs/nixos/modules/profiles/qemu-guest.nix>
../2configs/collectd-base.nix
../2configs/shack-nix-cacher.nix
diff --git a/shared/2configs/base.nix b/shared/2configs/default.nix
index 5aa5897d7..31f786d1d 100644
--- a/shared/2configs/base.nix
+++ b/shared/2configs/default.nix
@@ -11,10 +11,13 @@ with config.krebs.lib;
nixos-config.symlink = "stockholm/${user.name}/1systems/${host.name}.nix";
nixpkgs.git = {
url = https://github.com/NixOS/nixpkgs;
- ref = "63b9785"; # stable @ 2016-06-01
+ ref = "9cb194cfa449c43f63185a25c8d10307aea3b358"; # nixos-16.03 @ 2016-08-05
};
- secrets.file = "${getEnv "HOME"}/secrets/krebs/${host.name}";
- stockholm.file = "${getEnv "HOME"}/stockholm";
+ secrets.file =
+ if getEnv "dummy_secrets" == "true"
+ then toString <stockholm/shared/6tests/data/secrets>
+ else "${getEnv "HOME"}/secrets/krebs/${host.name}";
+ stockholm.file = getEnv "PWD";
};
networking.hostName = config.krebs.build.host.name;
diff --git a/shared/2configs/shared-buildbot.nix b/shared/2configs/shared-buildbot.nix
index 688f8f9aa..58db4c94c 100644
--- a/shared/2configs/shared-buildbot.nix
+++ b/shared/2configs/shared-buildbot.nix
@@ -71,7 +71,11 @@
# prepare grab_repo step for stockholm
grab_repo = steps.Git(repourl=stockholm_repo, mode='incremental')
- env = {"LOGNAME": "shared", "NIX_REMOTE": "daemon"}
+ env = {
+ "LOGNAME": "shared",
+ "NIX_REMOTE": "daemon",
+ "dummy_secrets": "true",
+ }
# prepare nix-shell
# the dependencies which are used by the test script
@@ -91,37 +95,24 @@
'';
builder = {
fast-tests = ''
- f = util.BuildFactory()
- f.addStep(grab_repo)
- for i in [ "test-centos7", "wolf", "test-failing" ]:
- addShell(f,name="populate-{}".format(i),env=env,
- command=nixshell + \
- ["{}(make system={} populate debug=true)".format("!" if "failing" in i else "",i)])
+ f = util.BuildFactory()
+ f.addStep(grab_repo)
- # XXX we must prepare ./retiolum.rsa_key.priv for secrets to work
- addShell(f,name="instantiate-test-all-modules",env=env,
- command=nixshell + \
- ["touch retiolum.rsa_key.priv; \
- nix-instantiate \
- --show-trace --eval --strict --json \
- -I nixos-config=./shared/1systems/test-all-krebs-modules.nix \
- -I secrets=. \
- -A config.system.build.toplevel"]
- )
+ for i in [ "test-minimal-deploy", "test-all-krebs-modules", "wolf", "test-centos7" ]:
+ addShell(f,name="build-{}".format(i),env=env,
+ command=nixshell + \
+ ["mkdir -p /tmp/testbuild/$LOGNAME && touch /tmp/testbuild/$LOGNAME/.populate; \
+ make \
+ test \
+ target=$LOGNAME@${config.krebs.build.host.name}/tmp/testbuild/$LOGNAME \
+ method=eval \
+ system={}".format(i)])
- addShell(f,name="build-test-minimal",env=env,
- command=nixshell + \
- ["nix-instantiate \
- --show-trace --eval --strict --json \
- -I nixos-config=./shared/1systems/test-minimal-deploy.nix \
- -I secrets=. \
- -A config.system.build.toplevel"]
- )
+ bu.append(util.BuilderConfig(name="fast-tests",
+ slavenames=slavenames,
+ factory=f))
- bu.append(util.BuilderConfig(name="fast-tests",
- slavenames=slavenames,
- factory=f))
- '';
+ '';
# this build will try to build against local nixpkgs
# TODO change to do a 'local' populate and use the retrieved nixpkgs
build-local = ''
diff --git a/shared/6tests/data/secrets/grafana_security.nix b/shared/6tests/data/secrets/grafana_security.nix
new file mode 100644
index 000000000..0967ef424
--- /dev/null
+++ b/shared/6tests/data/secrets/grafana_security.nix
@@ -0,0 +1 @@
+{}
diff --git a/shared/6tests/data/secrets/retiolum.rsa_key.priv b/shared/6tests/data/secrets/retiolum.rsa_key.priv
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/shared/6tests/data/secrets/retiolum.rsa_key.priv
diff --git a/shared/6tests/data/secrets/ssh.id_ed25519 b/shared/6tests/data/secrets/ssh.id_ed25519
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/shared/6tests/data/secrets/ssh.id_ed25519
diff --git a/shared/default.nix b/shared/default.nix
index 69b4abaac..320e1a133 100644
--- a/shared/default.nix
+++ b/shared/default.nix
@@ -2,6 +2,7 @@ _:
{
imports = [
../krebs
+ ./2configs
./3modules
];
}