X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fpacker-build.sh;h=1caca8e32f66aed37253ca6eab17acc924313a0f;hb=2a10c83b2d506008cc6c01c134515fb6328e1f3a;hp=177bb1cb04d6c0f18a3be491b44640f2997ff031;hpb=7ce2809af0e22181a0e399311f879f34f2392e32;p=releng%2Fglobal-jjb.git diff --git a/shell/packer-build.sh b/shell/packer-build.sh index 177bb1cb..1caca8e3 100644 --- a/shell/packer-build.sh +++ b/shell/packer-build.sh @@ -22,15 +22,20 @@ PACKER_BUILD_LOG="$PACKER_LOGS_DIR/packer-build.log" mkdir -p "$PACKER_LOGS_DIR" export PATH="${WORKSPACE}/bin:$PATH" +cd packer || exit + # Prioritize the project's own version of vars if available -platform_file="vars/$PACKER_PLATFORM.json" -if [ -f "$PACKER_PLATFORM" ]; then +platform_file="common-packer/vars/$PACKER_PLATFORM.json" +if [ -f "vars/$PACKER_PLATFORM.json" ]; then platform_file="vars/$PACKER_PLATFORM.json" fi -cd packer export PACKER_LOG="yes" export PACKER_LOG_PATH="$PACKER_BUILD_LOG" +packer.io validate \ + -var-file="$CLOUDENV" \ + -var-file="$platform_file" \ + "templates/$PACKER_TEMPLATE.json" packer.io build -color=false \ -var-file="$CLOUDENV" \ -var-file="$platform_file" \