Bump Vagrant version and copy debug log back to circle
This commit is contained in:
@@ -63,6 +63,9 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ "$MINUTES_PAST" -gt 120 ]; then
|
if [ "$MINUTES_PAST" -gt 120 ]; then
|
||||||
|
export IP_ADDRESS=$(cat /tmp/ip_address);
|
||||||
|
scp -i ~/.ssh/id_rsa root@"$IP_ADDRESS":/opt/DetectionLab/Vagrant/vagrant.log .
|
||||||
|
cat vagrant.log
|
||||||
curl -X DELETE --header 'Accept: application/json' --header 'X-Auth-Token: '"$PACKET_API_TOKEN" 'https://api.packet.net/devices/'"$DEVICE_ID"
|
curl -X DELETE --header 'Accept: application/json' --header 'X-Auth-Token: '"$PACKET_API_TOKEN" 'https://api.packet.net/devices/'"$DEVICE_ID"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -74,6 +77,9 @@ jobs:
|
|||||||
export STATUS=$(cat /tmp/status)
|
export STATUS=$(cat /tmp/status)
|
||||||
echo $STATUS
|
echo $STATUS
|
||||||
if [ "$STATUS" != "success" ]; then
|
if [ "$STATUS" != "success" ]; then
|
||||||
|
export IP_ADDRESS=$(cat /tmp/ip_address);
|
||||||
|
scp -i ~/.ssh/id_rsa root@"$IP_ADDRESS":/opt/DetectionLab/Vagrant/vagrant.log .
|
||||||
|
cat vagrant.log
|
||||||
curl -X DELETE --header 'Accept: application/json' --header 'X-Auth-Token: '"$PACKET_API_TOKEN" 'https://api.packet.net/devices/'"$DEVICE_ID"
|
curl -X DELETE --header 'Accept: application/json' --header 'X-Auth-Token: '"$PACKET_API_TOKEN" 'https://api.packet.net/devices/'"$DEVICE_ID"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ ufw --force enable
|
|||||||
# Install Vagrant
|
# Install Vagrant
|
||||||
mkdir /opt/vagrant
|
mkdir /opt/vagrant
|
||||||
cd /opt/vagrant || exit 1
|
cd /opt/vagrant || exit 1
|
||||||
wget https://releases.hashicorp.com/vagrant/2.0.1/vagrant_2.0.1_x86_64.deb
|
wget https://releases.hashicorp.com/vagrant/2.0.2/vagrant_2.0.2_x86_64.deb
|
||||||
dpkg -i vagrant_2.0.1_x86_64.deb
|
dpkg -i vagrant_2.0.2_x86_64.deb
|
||||||
vagrant plugin install vagrant-reload
|
vagrant plugin install vagrant-reload
|
||||||
|
|
||||||
# Install Packer
|
# Install Packer
|
||||||
@@ -51,4 +51,4 @@ cd /opt/DetectionLab || exit 1
|
|||||||
# Start the build in a tmux session
|
# Start the build in a tmux session
|
||||||
sn=tmuxsession
|
sn=tmuxsession
|
||||||
tmux new-session -s "$sn" -d
|
tmux new-session -s "$sn" -d
|
||||||
tmux send-keys -t "$sn:0" './build.sh virtualbox && echo "success" > /var/www/html/index.html || echo "failed" > /var/www/html/index.html' Enter
|
tmux send-keys -t "$sn:0" './build.sh virtualbox | tee -a /opt/DetectionLab/Vagrant/vagrant.log && echo "success" > /var/www/html/index.html || echo "failed" > /var/www/html/index.html' Enter
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ ufw --force enable
|
|||||||
# Install Vagrant
|
# Install Vagrant
|
||||||
mkdir /opt/vagrant
|
mkdir /opt/vagrant
|
||||||
cd /opt/vagrant || exit 1
|
cd /opt/vagrant || exit 1
|
||||||
wget https://releases.hashicorp.com/vagrant/2.0.1/vagrant_2.0.1_x86_64.deb
|
wget https://releases.hashicorp.com/vagrant/2.0.2/vagrant_2.0.2_x86_64.deb
|
||||||
dpkg -i vagrant_2.0.1_x86_64.deb
|
dpkg -i vagrant_2.0.2_x86_64.deb
|
||||||
vagrant plugin install vagrant-reload
|
vagrant plugin install vagrant-reload
|
||||||
|
|
||||||
# Make the Vagrant instances headless
|
# Make the Vagrant instances headless
|
||||||
@@ -39,4 +39,4 @@ cd /opt/DetectionLab || exit 1
|
|||||||
# Start the build in a tmux session
|
# Start the build in a tmux session
|
||||||
sn=tmuxsession
|
sn=tmuxsession
|
||||||
tmux new-session -s "$sn" -d
|
tmux new-session -s "$sn" -d
|
||||||
tmux send-keys -t "$sn:0" './build_vagrant_only.sh virtualbox && echo "success" > /var/www/html/index.html || echo "failed" > /var/www/html/index.html' Enter
|
tmux send-keys -t "$sn:0" './build_vagrant_only.sh virtualbox | tee -a /opt/DetectionLab/Vagrant/vagrant.log && echo "success" > /var/www/html/index.html || echo "failed" > /var/www/html/index.html' Enter
|
||||||
|
|||||||
Reference in New Issue
Block a user