Code Review
/
releng
/
global-jjb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add submodule-timeout for submodule operations
[releng/global-jjb.git]
/
shell
/
packer-build.sh
diff --git
a/shell/packer-build.sh
b/shell/packer-build.sh
index
d3e306f
..
1caca8e
100644
(file)
--- 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"
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="common-packer/vars/$PACKER_PLATFORM.json"
# Prioritize the project's own version of vars if available
platform_file="common-packer/vars/$PACKER_PLATFORM.json"
-if [ -f "
$PACKER_PLATFORM
" ]; then
+if [ -f "
vars/$PACKER_PLATFORM.json
" ]; then
platform_file="vars/$PACKER_PLATFORM.json"
fi
platform_file="vars/$PACKER_PLATFORM.json"
fi
-cd packer
export PACKER_LOG="yes"
export PACKER_LOG_PATH="$PACKER_BUILD_LOG"
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" \
packer.io build -color=false \
-var-file="$CLOUDENV" \
-var-file="$platform_file" \