Drop NixOS 19.03
This commit is contained in:
parent
a2f5c9415c
commit
144864d61c
8 changed files with 14 additions and 101 deletions
|
@ -8,7 +8,7 @@
|
|||
|
||||
* Add a tested example for Traefik with label-based routing.
|
||||
|
||||
* Drop obsolete NixOS 19.09 and 20.03 support. It may still be usable there.
|
||||
* Drop obsolete NixOS 19.03, 19.09 and 20.03 from CI.
|
||||
|
||||
## 0.1.2.0 -- 2020-03-05
|
||||
|
||||
|
|
15
nix/ci.nix
15
nix/ci.nix
|
@ -5,17 +5,6 @@ let
|
|||
in
|
||||
|
||||
dimension "Nixpkgs version" {
|
||||
"nixos-19_03" = {
|
||||
# flyingcircus.io latest long-term support is based off 19.03
|
||||
# https://flyingcircus.io/doc/
|
||||
# It is nice to have some level of support for their platform,
|
||||
# but we don't guarantee any support.
|
||||
nixpkgsSource = "nixos-19.03";
|
||||
enableDoc = false;
|
||||
nixosTestIsPerl = true;
|
||||
dockerSupportsSystemd = true;
|
||||
nixosHasPodmanDockerSocket = false;
|
||||
};
|
||||
"nixos-20_09" = {
|
||||
nixpkgsSource = "nixos-20.09";
|
||||
isReferenceNixpkgs = true;
|
||||
|
@ -29,7 +18,7 @@ dimension "Nixpkgs version" {
|
|||
};
|
||||
} (
|
||||
_name: { nixpkgsSource, isReferenceNixpkgs ? false, enableDoc ? true,
|
||||
nixosTestIsPerl ? false, dockerSupportsSystemd ? false, nixosHasPodmanDockerSocket ? true }:
|
||||
dockerSupportsSystemd ? false, nixosHasPodmanDockerSocket ? true }:
|
||||
|
||||
|
||||
dimension "System" {
|
||||
|
@ -39,7 +28,7 @@ dimension "Nixpkgs version" {
|
|||
system: { isReferenceTarget ? false, enableNixOSTests ? true }:
|
||||
let
|
||||
pkgs = import ./. {
|
||||
inherit system nixosTestIsPerl dockerSupportsSystemd nixosHasPodmanDockerSocket;
|
||||
inherit system dockerSupportsSystemd nixosHasPodmanDockerSocket;
|
||||
nixpkgsSrc = sources.${nixpkgsSource};
|
||||
};
|
||||
in
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
, nixpkgsName ? "nixos-unstable"
|
||||
, nixpkgsSrc ? sources.${nixpkgsName}
|
||||
, system ? builtins.currentSystem
|
||||
, nixosTestIsPerl ? false
|
||||
, dockerSupportsSystemd ? false
|
||||
, nixosHasPodmanDockerSocket ? true
|
||||
, ...
|
||||
|
@ -14,9 +13,8 @@ import nixpkgsSrc ({
|
|||
};
|
||||
overlays = [
|
||||
(_: _: {
|
||||
inherit nixosTestIsPerl;
|
||||
arionTestingFlags = {
|
||||
inherit nixosTestIsPerl dockerSupportsSystemd nixosHasPodmanDockerSocket;
|
||||
inherit dockerSupportsSystemd nixosHasPodmanDockerSocket;
|
||||
};
|
||||
})
|
||||
(import ./overlay.nix)
|
||||
|
|
|
@ -11,18 +11,6 @@
|
|||
"url": "https://github.com/nmattia/niv/archive/fad2a6cbfb2e7cdebb7cb0ad2f5cc91e2c9bc06b.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"nixos-19.03": {
|
||||
"branch": "nixos-19.03",
|
||||
"description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to",
|
||||
"homepage": "https://github.com/NixOS/nixpkgs",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs-channels",
|
||||
"rev": "34c7eb7545d155cc5b6f499b23a7cb1c96ab4d59",
|
||||
"sha256": "11z6ajj108fy2q5g8y4higlcaqncrbjm3dnv17pvif6avagw4mcb",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs-channels/archive/34c7eb7545d155cc5b6f499b23a7cb1c96ab4d59.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"nixos-20.09": {
|
||||
"branch": "nixos-20.09",
|
||||
"description": "Nix Packages collection",
|
||||
|
|
|
@ -3,14 +3,15 @@
|
|||
# based on nixpkgs/nixos/modules/system/activation/top-level.nix
|
||||
|
||||
let
|
||||
inherit (lib) filter concatStringsSep types mkOption;
|
||||
|
||||
# lib.showWarnings since 19.09
|
||||
showWarnings = warnings: res: lib.fold (w: x: lib.warn w x) res warnings;
|
||||
warn = msg: builtins.trace "[1;31mwarning: ${msg}[0m";
|
||||
inherit (lib)
|
||||
concatStringsSep
|
||||
filter
|
||||
mkOption
|
||||
showWarnings
|
||||
types
|
||||
;
|
||||
|
||||
# Handle assertions and warnings
|
||||
|
||||
failedAssertions = map (x: x.message) (filter (x: !x.assertion) config.assertions);
|
||||
|
||||
assertWarn = if failedAssertions != []
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
This test suite exists only to keep tests around for older versions of NixOS.
|
||||
|
||||
This will be removed when 19.09 becomes irrelevant.
|
|
@ -1,60 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
# To make some prebuilt derivations available in the vm
|
||||
preEval = modules: import ../../src/nix/eval-composition.nix {
|
||||
inherit modules;
|
||||
inherit pkgs;
|
||||
};
|
||||
in
|
||||
{
|
||||
name = "arion-test";
|
||||
machine = { pkgs, lib, ... }: {
|
||||
environment.systemPackages = [
|
||||
pkgs.arion
|
||||
];
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
# no caches, because no internet
|
||||
nix.binaryCaches = lib.mkForce [];
|
||||
|
||||
# FIXME: Sandbox seems broken with current version of NixOS test
|
||||
# w/ writable store. Error:
|
||||
# machine# error: linking '/nix/store/7r8z2zvhwda85pgpdn5hzzz6hs1njklc-stdenv-linux.drv.chroot/nix/store/6v3y7s4q4wd16hsw393gjpxvcf9159bv-patch-shebangs.sh' to '/nix/store/6v3y7s4q4wd16hsw393gjpxvcf9159bv-patch-shebangs.sh': Operation not permitted
|
||||
#
|
||||
# There should be no reason why arion can't run without
|
||||
# sandboxing, so please re-enable.
|
||||
nix.useSandbox = false;
|
||||
|
||||
virtualisation.writableStore = true;
|
||||
virtualisation.pathsInNixDB = [
|
||||
# Pre-build the image because we don't want to build the world
|
||||
# in the vm.
|
||||
(preEval [ ../../examples/minimal/arion-compose.nix ]).config.out.dockerComposeYaml
|
||||
(preEval [ ../../examples/full-nixos/arion-compose.nix ]).config.out.dockerComposeYaml
|
||||
(preEval [ ../../examples/nixos-unit/arion-compose.nix ]).config.out.dockerComposeYaml
|
||||
pkgs.stdenv
|
||||
];
|
||||
|
||||
virtualisation.memorySize = 512;
|
||||
};
|
||||
testScript = ''
|
||||
$machine->fail("curl localhost:8000");
|
||||
$machine->succeed("docker --version");
|
||||
|
||||
my $makeSubtest = sub {
|
||||
my ( $subtestName, $exampleSrc ) = @_;
|
||||
|
||||
subtest $subtestName => sub {
|
||||
$machine->succeed("rm -rf work && cp -frT $exampleSrc work && cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion up -d");
|
||||
$machine->waitUntilSucceeds("curl localhost:8000");
|
||||
$machine->succeed("cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion down");
|
||||
$machine->waitUntilFails("curl localhost:8000");
|
||||
};
|
||||
};
|
||||
|
||||
$makeSubtest->("minimal", "${../../examples/minimal}");
|
||||
$makeSubtest->("full-nixos", "${../../examples/full-nixos}");
|
||||
$makeSubtest->("nixos-unit", "${../../examples/nixos-unit}");
|
||||
'';
|
||||
}
|
|
@ -1,11 +1,12 @@
|
|||
{ pkgs ? import ../pkgs.nix, nixosTestIsPerl ? false, arionTestingFlags ? {} }:
|
||||
{ pkgs ? import ../pkgs.nix, arionTestingFlags ? {} }:
|
||||
let
|
||||
inherit (pkgs) nixosTest recurseIntoAttrs arion;
|
||||
in
|
||||
|
||||
recurseIntoAttrs {
|
||||
|
||||
test = if nixosTestIsPerl then nixosTest ./arion-test-perl else nixosTest ./arion-test;
|
||||
test = nixosTest ./arion-test;
|
||||
|
||||
testWithPodman =
|
||||
if arionTestingFlags.nixosHasPodmanDockerSocket
|
||||
then nixosTest (pkgs.callPackage ./arion-test { usePodman = true; })
|
||||
|
|
Loading…
Reference in a new issue