mirror of https://github.com/MISP/misp-packer
chg: [deploy] More generic udpates
parent
edb56816f2
commit
709a13054b
|
@ -199,15 +199,15 @@ if [[ "${LATEST_COMMIT}" != "$(cat /tmp/${PACKER_NAME}-latest.sha)" ]]; then
|
|||
echo "Current ${PACKER_VM} version is: ${VER}@${LATEST_COMMIT_SHORT}"
|
||||
|
||||
# Search and replace for vm_name and make sure we can easily identify the generated VMs
|
||||
cat ${PACKER_NAME}.json| sed "s|\"vm_name\": \"MISP_demo\",|\"vm_name\": \"${PACKER_VM}_${VER}@${LATEST_COMMIT_SHORT}\",|" > ${PACKER_NAME}-deploy.json
|
||||
cat ${PACKER_NAME}.json| sed "s|\"vm_name\": \"${PACKER_VM}_demo\",|\"vm_name\": \"${PACKER_VM}_${VER}@${LATEST_COMMIT_SHORT}\",|" > ${PACKER_NAME}-deploy.json
|
||||
|
||||
# Build virtualbox VM set
|
||||
PACKER_LOG_PATH="${PWD}/packerlog-vbox.txt"
|
||||
($PACKER_RUN build --on-error=cleanup -only=virtualbox-iso ${PACKER_NAME}-deploy.json ; echo $? > /tmp/vbox.done) &
|
||||
($PACKER_RUN build --on-error=cleanup -var "vm_description=${vm_description}" -var "vm_version=${vm_version}" -only=virtualbox-iso ${PACKER_NAME}-deploy.json ; echo $? > /tmp/vbox.done) &
|
||||
|
||||
# Build vmware VM set
|
||||
PACKER_LOG_PATH="${PWD}/packerlog-vmware.txt"
|
||||
($PACKER_RUN build --on-error=cleanup -only=vmware-iso ${PACKER_NAME}-deploy.json ; echo $? > /tmp/vmware.done) &
|
||||
($PACKER_RUN build --on-error=cleanup -var "vm_description=${vm_description}" -var "vm_version=${vm_version}" -only=vmware-iso ${PACKER_NAME}-deploy.json ; echo $? > /tmp/vmware.done) &
|
||||
|
||||
# The below waits for the above 2 parallel packer builds to finish
|
||||
while [[ ! -f /tmp/vmware.done ]]; do :; done
|
||||
|
|
Loading…
Reference in New Issue