sudo aptitude update
#Make aptitude be fully non-interactive, so we don't get the issues with Grub trying to configure itself.
sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
sudo apt-get -y install jenkins
#Get the public key for Perforce package repo
sudo wget -qO - https://package.perforce.com/perforce.pubkey | sudo apt-key add -
#Update sources list with the Perforce Package repo.
sudo echo "deb http://package.perforce.com/apt/ubuntu xenial release" >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get -y install helix-cli helix-p4d
#Configure P4D
sudo /opt/perforce/sbin/configure-helix-p4d.sh -n perforce1 -p ssl:1666 -r /opt/perforce/servers/perforce1 -u super -P REinforce --unicode
#Setup the Jenkins cli, so we can install the plugins without needing the GUI
sudo service jenkins start
#java -jar jenkins-cli.jar -s http://host-ip:8080/ -remoting install-plugin ./plugin.hpi --username my-user --password my-pass -restart