#!/usr/bin/env bash
# jenkins install bash shell
success_or_fail(){
if [[ $? == "0" ]]
then
echo success of job $1
else
echo failed of $1
exit 1
fi
}
wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | sudo apt-key add -
success_or_fail key_add
echo "deb http://pkg.jenkins-ci.org/debian-stable binary/" >> /etc/apt/sources.list.d/official-package-repositories.list
success_or_fail apt-source-add
sudo apt-get update
success_or_fail apt-update
sudo apt-get install -y jenkins
success_or_fail jenkins
No comments:
Post a Comment