Skip to content

Commit

Permalink
Merge pull request #85341 from Ma27/bump-hydra
Browse files Browse the repository at this point in the history
hydra: 2020-04-07 -> 2020-04-16
  • Loading branch information
Ma27 authored Apr 16, 2020
2 parents 5f814bf + 5e124e5 commit ab0a10b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
12 changes: 9 additions & 3 deletions nixos/tests/hydra/db-migration.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{ system ? builtins.currentSystem, ... }:
{ system ? builtins.currentSystem
, pkgs ? import ../../.. { inherit system; }
, ...
}:

let inherit (import ./common.nix { inherit system; }) baseConfig; in

{ mig = import ../make-test-python.nix ({ pkgs, lib, ... }: {
with import ../../lib/testing-python.nix { inherit system pkgs; };
with pkgs.lib;

{ mig = makeTest {
name = "hydra-db-migration";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ ma27 ];
Expand Down Expand Up @@ -82,5 +88,5 @@ let inherit (import ./common.nix { inherit system; }) baseConfig; in
original.shutdown()
'';
});
};
}
3 changes: 2 additions & 1 deletion pkgs/development/tools/misc/hydra/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
, docbook_xsl, openssh, gnused, coreutils, findutils, gzip, lzma, gnutar
, rpm, dpkg, cdrkit, pixz, lib, boost, autoreconfHook, src ? null, version ? null
, migration ? false, patches ? []
, tests ? {}
}:

with stdenv;
Expand Down Expand Up @@ -124,7 +125,7 @@ in stdenv.mkDerivation rec {

dontStrip = true;

passthru = { inherit perlDeps migration; };
passthru = { inherit perlDeps migration tests; };

meta = with stdenv.lib; {
description = "Nix-based continuous build system";
Expand Down
24 changes: 13 additions & 11 deletions pkgs/development/tools/misc/hydra/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ fetchFromGitHub, nixStable, callPackage, nixFlakes, fetchpatch }:
{ fetchFromGitHub, nixStable, callPackage, nixFlakes, fetchpatch, nixosTests }:

{
# Package for phase-1 of the db migration for Hydra.
Expand All @@ -13,26 +13,28 @@
};
nix = nixStable;
migration = true;

tests = {
db-migration = nixosTests.hydra-db-migration.mig;
basic = nixosTests.hydra.hydra-migration;
};
};

# Hydra from latest master branch. Contains breaking changes,
# so when having an older version, `pkgs.hydra-migration` should be deployed first.

hydra-unstable = callPackage ./common.nix {
version = "2020-04-07";
version = "2020-04-16";
src = fetchFromGitHub {
owner = "NixOS";
repo = "hydra";
rev = "4cabb37ebdeade1435ad8ebf1913cdd603b9c452";
sha256 = "1ccy639x6yyrqqqqli7vlqm6pcvcq5dx1w3ckba77rl8pd5h31f7";
rev = "87837f1d82904bf48e11b5641258b6be2f663c3b";
sha256 = "1vs3lyfyafsl7wbpmycv7c3n9n2rkrswp65msb6q1iskgpvr96d5";
};
patches = [
# https://github.com/NixOS/hydra/pull/732
(fetchpatch {
url = "https://github.com/NixOS/hydra/commit/2f9d422172235297759f2b224fe0636cad07b6fb.patch";
sha256 = "0152nsqqc5d85qdygmwrsk88i9y6nk1b639fj2n042pjvr0kpz6k";
})
];
nix = nixFlakes;
tests = {
db-migration = nixosTests.hydra-db-migration.mig;
basic = nixosTests.hydra.hydra-unstable;
};
};
}

0 comments on commit ab0a10b

Please sign in to comment.