diff options
author | Christopher Baines <mail@cbaines.net> | 2018-07-04 10:04:21 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-07-04 10:04:21 +0100 |
commit | 4f0dd9a5f36b2f5f36003c25daae4859b1275781 (patch) | |
tree | 04ea2d10fb92ffa36f45bff069ec6a1b26ddeeb8 /app | |
parent | 5d50c7e7a8175c8ac3d1a650cc4e7ad2f4800acf (diff) | |
download | govuk-mini-environment-admin-4f0dd9a5f36b2f5f36003c25daae4859b1275781.tar govuk-mini-environment-admin-4f0dd9a5f36b2f5f36003c25daae4859b1275781.tar.gz |
Support looking for available services on remote hosts
Diffstat (limited to 'app')
-rw-r--r-- | app/jobs/govuk_guix/fetch_revision_job.rb | 7 |
1 files 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?('[') } |