From 4f0dd9a5f36b2f5f36003c25daae4859b1275781 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 4 Jul 2018 10:04:21 +0100 Subject: Support looking for available services on remote hosts --- app/jobs/govuk_guix/fetch_revision_job.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/jobs/govuk_guix/fetch_revision_job.rb b/app/jobs/govuk_guix/fetch_revision_job.rb index 42177ff..afbff71 100644 --- a/app/jobs/govuk_guix/fetch_revision_job.rb +++ b/app/jobs/govuk_guix/fetch_revision_job.rb @@ -54,7 +54,7 @@ class GovukGuix::FetchRevisionJob < Que::Job GovukGuix::Revision.create( commit_hash: sha, store_path: store_path, - available_services: available_services(store_path) + available_services: available_services(store_path, remote_host) ) end @@ -112,12 +112,13 @@ class GovukGuix::FetchRevisionJob < Que::Job return sha end - def available_services(store_path) + def available_services(store_path, remote_host) command_output = run_command( "#{store_path}/bin/govuk", "system", "available-services", - "--json" + "--json", + run_remotely_on_host: remote_host ) json_start = command_output.find_index { |line| line.starts_with?('[') } -- cgit v1.2.3