From fb8a0fe0cb2c32037ec16ad2b377aa63a42b114a Mon Sep 17 00:00:00 2001 From: Todd Malsbary Date: Fri, 24 Sep 2021 15:25:29 -0700 Subject: [PATCH] Fix go error in package_prerequisite step The common.sh file is sourced before go is installed and it wants to execute go env. Defer the execution until after go is installed. Signed-off-by: Todd Malsbary Change-Id: I53063c60eb6140eeb79b7567ac3585ca477ce3fd --- deploy/metal3/scripts/01_metal3.sh | 5 +++++ env/lib/common.sh | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/deploy/metal3/scripts/01_metal3.sh b/deploy/metal3/scripts/01_metal3.sh index 9a8f079..77597db 100755 --- a/deploy/metal3/scripts/01_metal3.sh +++ b/deploy/metal3/scripts/01_metal3.sh @@ -12,6 +12,11 @@ if [[ $EUID -ne 0 ]]; then exit 1 fi +#Path to clone the metal3 dev env repo +M3PATH="$(go env GOPATH)/src/github.com/metal3-io" +#Path to clone the baremetal operator repo +BMOPATH="${M3PATH}/baremetal-operator" + IMAGE_URL=http://172.22.0.1/images/${BM_IMAGE} IMAGE_CHECKSUM=http://172.22.0.1/images/${BM_IMAGE}.md5sum diff --git a/env/lib/common.sh b/env/lib/common.sh index aa8a1e9..9ac1431 100755 --- a/env/lib/common.sh +++ b/env/lib/common.sh @@ -18,10 +18,6 @@ IRONIC_PROVISIONING_INTERFACE_IP=${IRONIC_PROVISIONING_INTERFACE_IP:-"172.22.0.1 BM_IMAGE_URL=${BM_IMAGE_URL:-"https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img"} BM_IMAGE=${BM_IMAGE:-"bionic-server-cloudimg-amd64.img"} -#Path to clone the metal3 dev env repo -M3PATH="$(go env GOPATH)/src/github.com/metal3-io" -#Path to clone the baremetal operator repo -BMOPATH="${M3PATH}/baremetal-operator" #Baremetal operator repository URL BMOREPO="${BMOREPO:-https://github.com/metal3-io/baremetal-operator.git}" #Baremetal operator repository branch to checkout -- 2.16.6