aboutsummaryrefslogtreecommitdiff
path: root/app/services/govuk_guix/build_mini_environment.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/govuk_guix/build_mini_environment.rb')
-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],