Allow users to reproduce builds on their own systems
You can now do: bash <(curl http://hydra-server/build/1238757/reproduce) to download and execute a script that reproduces a Hydra build locally. This script fetches all inputs (e.g. Git repositories) and then invokes nix-build. The downloaded sources are stored in /tmp/build-<buildid> and reused between invocations of the script. Any additional command line options are passed to nix-build. So bash <(curl http://hydra-server/build/1238757/reproduce) --run-env will drop you in a shell where you can interactively hack on the build, e.g. $ source $stdenv/setup $ set +e $ unpackPhase $ cd $sourceRoot $ configurePhase $ emacs foo.c & $ make and so on.
This commit is contained in:
@ -593,4 +593,12 @@ sub evals : Chained('build') PathPart('evals') Args(0) {
|
||||
}
|
||||
|
||||
|
||||
sub reproduce : Chained('build') PathPart('reproduce') Args(0) {
|
||||
my ($self, $c) = @_;
|
||||
$c->response->content_type('text/x-shellscript');
|
||||
$c->response->header('Content-Disposition', 'attachment; filename="reproduce-build-' . $c->stash->{build}->id . '.sh"');
|
||||
$c->stash->{template} = 'reproduce.tt';
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
Reference in New Issue
Block a user