From f37ca8e9b10005cf6d4d480e1929ab7cee469a14 Mon Sep 17 00:00:00 2001 From: Steve Clement Date: Fri, 10 May 2019 11:34:47 +0200 Subject: [PATCH] fix: [deploy] Scopes matter, () spawns a subshell and we need to export stuff that happens there. --- deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index 5a5f27c..e6eea0f 100755 --- a/deploy.sh +++ b/deploy.sh @@ -182,11 +182,11 @@ if [[ "${LATEST_COMMIT}" != "$(cat /tmp/${PACKER_NAME}-latest.sha)" ]]; then # Build virtualbox VM set PACKER_LOG_PATH="${PWD}/packerlog-vbox.txt" - ($PACKER_RUN build --on-error=cleanup -only=virtualbox-iso misp-deploy.json ; VIRTUALBOX_BUILD=$? ; touch /tmp/vbox.done) & + ($PACKER_RUN build --on-error=cleanup -only=virtualbox-iso misp-deploy.json ; export VIRTUALBOX_BUILD=$? ; touch /tmp/vbox.done) & # Build vmware VM set PACKER_LOG_PATH="${PWD}/packerlog-vmware.txt" - ($PACKER_RUN build --on-error=cleanup -only=vmware-iso misp-deploy.json ; VMWARE_BUILD=$? ; touch /tmp/vmware.done) & + ($PACKER_RUN build --on-error=cleanup -only=vmware-iso misp-deploy.json ; export VMWARE_BUILD=$? ; touch /tmp/vmware.done) & # The below waits for the above 2 parallel packer builds to finish while [[ ! -f /tmp/vmware.done ]]; do :; done