diff --git a/README.md b/README.md index 7ef40d0..4e6ea59 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,9 @@ require_once __DIR__ . '/vendor/autoload.php'; use PhpAmqpLib\Connection\AMQPSSLConnection; use PhpAmqpLib\Message\AMQPMessage; +define("NIX_SYSTEM", "x86_64-linux"); +define("WORKING_DIR", "/home/grahamc/.nix-test"); + function rabbitmq_conn() { $connection = new AMQPSSLConnection( 'events.nix.gsc.io', 5671, diff --git a/builder.php b/builder.php index 81b8020..d4109ab 100644 --- a/builder.php +++ b/builder.php @@ -11,7 +11,7 @@ $channel->basic_qos(null, 1, true); list($queueName, , ) = $channel->queue_declare('build-results', false, true, false, false); -list($queueName, , ) = $channel->queue_declare('build-inputs-x86_64-linux', +list($queueName, , ) = $channel->queue_declare('build-inputs-' . NIX_SYSTEM, false, true, false, false); $channel->queue_bind($queueName, 'build-jobs'); @@ -21,7 +21,7 @@ function runner($msg) { $body = json_decode($msg->body); $in = $body->payload; - $co = new GHE\Checkout("/home/grahamc/.nix-test", "builder"); + $co = new GHE\Checkout(WORKING_DIR, "builder"); $pname = $co->checkOutRef($in->repository->full_name, $in->repository->clone_url, $in->issue->number, diff --git a/mass-rebuilder.php b/mass-rebuilder.php index 9be08ff..2831dbd 100644 --- a/mass-rebuilder.php +++ b/mass-rebuilder.php @@ -81,7 +81,7 @@ function runner($msg) { $against_name = "origin/" . $in->pull_request->base->ref; echo "Building against $against_name\n"; - $co = new GHE\Checkout("/home/grahamc/.nix-test", "mr-est"); + $co = new GHE\Checkout(WORKING_DIR, "mr-est"); $pname = $co->checkOutRef($in->repository->full_name, $in->repository->clone_url, $in->number,