chg: [deploy] Various changes and clean-up

pull/23/head
Steve Clement 2019-05-15 17:23:43 +09:00
parent 9509c47b33
commit d0b7ede35d
5 changed files with 11 additions and 15 deletions

View File

@ -165,10 +165,8 @@ removeAll () {
[[ -d "output-virtualbox-iso" ]] && rm -r output-virtualbox-iso
[[ -d "output-vmware-iso" ]] && rm -r output-vmware-iso
[[ -d "VMware" ]] && rm -r VMware
rm *.zip *.sfv
rm -f *.zip *.zip.asc *.sfv *.sfv.asc *.ova *.ova.asc index.html
rm ${PACKER_NAME}-deploy.json
rm packer_virtualbox-iso_virtualbox-iso_sha*.sfv.asc
rm ${PACKER_VM}_${VER}@${LATEST_COMMIT_SHORT}-vmware.zip.asc
rm /tmp/LICENSE-${PACKER_NAME}
rm /tmp/vbox.done /tmp/vmware.done
}
@ -249,8 +247,9 @@ if [[ "${LATEST_COMMIT}" != "$(cat /tmp/${PACKER_NAME}-latest.sha)" ]]; then
done
if [[ "${REMOTE}" == "1" ]]; then
ssh ${REL_USER}@${REL_SERVER} "chmod -R +r export \
mv export/${PACKER_VM}_${VER}@${LATEST_COMMIT_SHORT}/*.CHECKSUM* export/${PACKER_VM}_${VER}@${LATEST_COMMIT_SHORT}/checksums \
ssh ${REL_USER}@${REL_SERVER} "chmod -R +r export ;\
mv export/${PACKER_VM}_${VER}@${LATEST_COMMIT_SHORT}/${PACKER_VM}_${VER}@${LATEST_COMMIT_SHORT}-CHECKSUM.sfv export/${PACKER_VM}_${VER}@${LATEST_COMMIT_SHORT}/checksums ;\
mv export/${PACKER_VM}_${VER}@${LATEST_COMMIT_SHORT}/${PACKER_VM}_${VER}@${LATEST_COMMIT_SHORT}-CHECKSUM.sfv.asc export/${PACKER_VM}_${VER}@${LATEST_COMMIT_SHORT}/checksums ;\
cd export ; tree -T "${PACKER_VM} VM Images" -H https://www.circl.lu/misp-images/ -o index.html"
fi

View File

@ -194,12 +194,5 @@
"pause_before": "10s",
"pause_after": "30s"
}
],
"post-processors":[{
"keep_input_artifact": "false",
"keep_input_artifact": false,
"type": "checksum",
"checksum_types": ["sha1", "sha256", "sha384", "sha512"]
}]
]
}

View File

@ -21,11 +21,14 @@ cd /var/www/MISP/PyMISP
if [ "$?" != "0" ]; then
echo "Damage, terrible terrible damage!!!!" >> /tmp/tests-output.txt
# TODO: Move the smtp server and e-mail address to a config file
set smtp=smtp://149.13.33.5 ; cat /tmp/tests-output.txt |mail -s "tests/testlive_comprehensive.py failed on autogen-VM" steve.clement@circl.lu
fi
rm -rf tests/viper-test-files
rm /etc/apt/apt.conf.d/99progressbar
# End Cleaning
echo "VM cleaned and rebooting for automagic reas0ns."
reboot

View File

@ -8,7 +8,7 @@
# $ cp /tmp/interfaces.sh .
echo "--- Using old style name (ethX) for interfaces"
sed -r 's/^(GRUB_CMDLINE_LINUX=).*/\1\"net\.ifnames=0\ biosdevname=0\"/' /etc/default/grub | sudo tee /etc/default/grub > /dev/null
sed -r 's/^(GRUB_CMDLINE_LINUX=).*/\1\"net\.ifnames=0\ biosdevname=0\"/' /etc/default/grub | sudo tee /etc/default/grub > /dev/null
# install ifupdown since ubuntu 18.04
sudo apt update
@ -23,4 +23,4 @@ auto eth0
iface eth0 inet dhcp
EOF
update-grub > /dev/null 2>&1
update-grub > /dev/null 2>&1

View File

@ -12,3 +12,4 @@ chmod 0440 /etc/sudoers.d/misp
# Disable fancy progressbar
echo 'Dpkg::Progress-Fancy "0";' > /etc/apt/apt.conf.d/99progressbar
echo 'Dpkg::Use-Pty "0";' >> /etc/apt/apt.conf.d/99progressbar