aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-07-01 09:01:53 +0100
committerChristopher Baines <mail@cbaines.net>2018-07-01 09:01:53 +0100
commita25950c4683036315632d44e3ef3d3d2d1da7a3d (patch)
treed95765aeafa060237b93a229545a18a818385d05
parent53341fafbede0ea3a1dfe0f53659b8f00aa3f723 (diff)
downloadgovuk-mini-environment-admin-a25950c4683036315632d44e3ef3d3d2d1da7a3d.tar
govuk-mini-environment-admin-a25950c4683036315632d44e3ef3d3d2d1da7a3d.tar.gz
Actually include the data snapshot when building
-rw-r--r--app/services/govuk_guix/build_mini_environment.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/services/govuk_guix/build_mini_environment.rb b/app/services/govuk_guix/build_mini_environment.rb
index 8e2d912..01920eb 100644
--- a/app/services/govuk_guix/build_mini_environment.rb
+++ b/app/services/govuk_guix/build_mini_environment.rb
@@ -51,12 +51,21 @@ module GovukGuix::BuildMiniEnvironment
)
end
+ data_snapshot_arguments = {}
+
+ if mini_environment.data_snapshot
+ data_snapshot_arguments[:data_snapshot] =
+ mini_environment.data_snapshot.store_path
+ end
+
output = run_command(
"#{mini_environment.govuk_guix_revision.store_path}/bin/govuk",
'system',
'build',
*hash_to_arguments(
- DEFAULT_ARGUMENTS.merge(options[:arguments])
+ DEFAULT_ARGUMENTS
+ .merge(options[:arguments])
+ .merge(data_snapshot_arguments)
),
*signon_user_arguments(mini_environment.signon_users),
*options[:services],