Merge "Add templates Tox + SonarQube Jenkins plugin"
[releng/global-jjb.git] / shell / packer-build.sh
index dfacdeb..0d9d68d 100644 (file)
@@ -44,8 +44,8 @@ packer.io build -color=false \
 # Extract image name from log and store value in the downstream job
 if [[ ${UPDATE_CLOUD_IMAGE} ]]; then
 
-    NEW_IMAGE_NAME=$(grep -P '(\s+.*image: )(ZZCI\s+.*\d+-\d+\.\d+)' "$PACKER_BUILD_LOG" \
-                  | awk -F': ' '{print $4}')\")
+    NEW_IMAGE_NAME=$(grep -P '(\s+.*image: )(ZZCI\s+.*\d+-\d+\.\d+)' \
+                          "$PACKER_BUILD_LOG" | awk -F': ' '{print $4}')
 
     echo NEW_IMAGE_NAME="$NEW_IMAGE_NAME" >> "$WORKSPACE/variables.prop"
     echo "NEW_IMAGE_NAME: ${NEW_IMAGE_NAME}"
@@ -53,7 +53,7 @@ if [[ ${UPDATE_CLOUD_IMAGE} ]]; then
     # Copy variables.prop to variables.jenkins-trigger so that the end of build
     # trigger can pick up the file as input for triggering downstream jobs.
     # Dont tigger downstream job when UPDATE_CLOUD_IMAGE is set to 'false'
-    cp $WORKSPACE/variables.prop $WORKSPACE/variables.jenkins-trigger
+    cp "$WORKSPACE/variables.prop" "$WORKSPACE/variables.jenkins-trigger"
 fi
 
 # Retrive the list of cloud providers