diff options
Diffstat (limited to 'app/jobs/govuk_guix/fetch_revision_job.rb')
-rw-r--r-- | app/jobs/govuk_guix/fetch_revision_job.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/app/jobs/govuk_guix/fetch_revision_job.rb b/app/jobs/govuk_guix/fetch_revision_job.rb index 76e16bd..c2c3c17 100644 --- a/app/jobs/govuk_guix/fetch_revision_job.rb +++ b/app/jobs/govuk_guix/fetch_revision_job.rb @@ -47,7 +47,8 @@ class GovukGuix::FetchRevisionJob < GovukGuix::Job GovukGuix::Revision.create( commit_hash: sha, - store_path: store_path + store_path: store_path, + available_services: available_services(store_path) ) end @@ -61,6 +62,17 @@ class GovukGuix::FetchRevisionJob < GovukGuix::Job end end + def available_services(store_path) + command_output = run_command( + "#{store_path}/bin/govuk", + "system", + "available-services", + "--json" + ) + + JSON.parse(command_output.join) + end + def repository_directory 'tmp/cache/govuk-guix' end |