Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Fix the jenkins install script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Yu authored and LGDoor committed Jun 11, 2018
1 parent 313287b commit aaedcd7
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions jenkins/install_jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ fi

sudo add-apt-repository ppa:openjdk-r/ppa --yes

echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/azure-cli/ wheezy main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 417A0893
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
wget -q -O - https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt-get install apt-transport-https
sudo apt-get update --yes

Expand Down Expand Up @@ -450,9 +450,6 @@ elif [ "${cloud_agents}" == 'aci' ]; then
echo "${final_jenkins_config}" | sudo tee /var/lib/jenkins/config.xml > /dev/null
fi

run_util_script "jenkins/run-cli-command.sh" -c "reload-configuration"


#install nginx
sudo apt-get install nginx --yes

Expand All @@ -468,6 +465,17 @@ run_util_script "jenkins/jenkins-on-azure/install-web-page.sh" -u "${jenkins_fqd
#restart nginx
sudo service nginx restart

# Restart Jenkins
#
# As of Jenkins 2.107.3, reload-configuration is not sufficient to instruct Jenkins to pick up all the configuration
# updates gracefully. Jenkins will be trapped in the blank SetupWizard mode after initial user setup, and the user
# cannot proceed their work on the Jenkins instance.
#
# A restart will do the full reloading.
sudo service jenkins restart
# Wait until Jenkins is fully startup and functioning.
retry_until_successful run_util_script "jenkins/run-cli-command.sh" -c "version"

#install common tools
sudo apt-get install git --yes
sudo apt-get install azure-cli --yes

0 comments on commit aaedcd7

Please # to comment.