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:
Eelco Dolstra
2013-04-04 17:30:07 +02:00
parent 48bb9c48ed
commit 9f027b22b1
3 changed files with 122 additions and 0 deletions

View File

@ -77,6 +77,13 @@
<div id="tabs-summary" class="tab-pane active">
[% IF build.nixexprinput %]
<a class="btn btn-info pull-right clearfix"
href="[%c.uri_for('/build' build.id 'reproduce')%]">
Reproduce this build locally
</a>
[% END %]
<table>
<tr>
<td>