From 954cf7fcdba099fd849dc9de57138313bf1d229d Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 3 Jul 2018 23:19:12 +0100 Subject: Use bash from Guix when fetching revisions remotely --- app/jobs/govuk_guix/fetch_revision_job.rb | 4 ++++ terraform/aws/backend/main.tf | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/jobs/govuk_guix/fetch_revision_job.rb b/app/jobs/govuk_guix/fetch_revision_job.rb index 63a1f04..42177ff 100644 --- a/app/jobs/govuk_guix/fetch_revision_job.rb +++ b/app/jobs/govuk_guix/fetch_revision_job.rb @@ -35,6 +35,10 @@ class GovukGuix::FetchRevisionJob < Que::Job sha = fetch_and_checkout(commit_hash, remote_host) command = [ + # Use bash from Guix if running remotely, as bash on Ubuntu + # seems to handle grouping arguments differently, which breaks + # guix-pre-inst-env + *(remote_host.nil? ? [] : '/home/ubuntu/.guix-profile/bin/bash'), "#{@repository_directory}/guix-pre-inst-env", 'guix', 'build', diff --git a/terraform/aws/backend/main.tf b/terraform/aws/backend/main.tf index 29e07cb..458bfaa 100644 --- a/terraform/aws/backend/main.tf +++ b/terraform/aws/backend/main.tf @@ -309,7 +309,7 @@ EOF if [ ! -d "/var/guix/profiles/per-user/ubuntu" ]; then cp -r /var/guix/profiles/per-user/root/guix-profile-1-link /var/guix/profiles/per-user/ubuntu/ ln -s /var/guix/profiles/per-user/ubuntu/guix-profile-1-link /var/guix/profiles/per-user/ubuntu/guix-profile - /var/guix/profiles/per-user/ubuntu/guix-profile/bin/guix package -i guile + /var/guix/profiles/per-user/ubuntu/guix-profile/bin/guix package -i guile bash fi ln -s /var/guix/profiles/per-user/ubuntu/guix-profile ~/.guix-profile EOF -- cgit v1.2.3