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

Commit

Permalink
Add an additional param for the url of Jenkins version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Yu authored and LGDoor committed Jun 20, 2017
1 parent cd8664d commit ddea2d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions jenkins/install_jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Arguments
--jenkins_fqdn|-jf [Required] : Jenkins FQDN
--vm_private_ip|-pi : The VM private ip used to configure Jenkins URL. If missing, jenkins_fqdn will be used instead
--jenkins_release_type|-jrt : The Jenkins release type (LTS or weekly or verified). By default it's set to LTS
--jenkins_version_location|-jvl : Url used to specify the version of Jenkins.
--artifacts_location|-al : Url used to reference other scripts/artifacts.
--sas_token|-st : A sas token needed if the artifacts location is private.
EOF
Expand Down Expand Up @@ -36,6 +37,7 @@ function run_util_script() {

#defaults
artifacts_location="https://raw.githubusercontent.com/Azure/azure-devops-utils/master/"
jenkins_version_location="https://raw.githubusercontent.com/Azure/azure-devops-utils/master/jenkins/jenkins-verified-ver"
azure_web_page_location="/usr/share/nginx/azure"
jenkins_release_type="LTS"

Expand All @@ -56,6 +58,10 @@ do
jenkins_release_type="$1"
shift
;;
--jenkins_version_location|-jvl)
jenkins_version_location="$1"
shift
;;
--artifacts_location|-al)
artifacts_location="$1"
shift
Expand Down Expand Up @@ -199,9 +205,9 @@ sudo apt-get install openjdk-8-jre openjdk-8-jre-headless openjdk-8-jdk --yes

#install jenkins
if [[ ${jenkins_release_type} == 'verified' ]]; then
jenkins_version=$(curl --silent "${artifacts_location}/jenkins/jenkins-verified-ver")
jenkins_version=$(curl --silent "${jenkins_version_location}")
deb_file=jenkins_${jenkins_version}_all.deb
wget -q https://pkg.jenkins.io/debian-stable/binary/${deb_file}
wget -q "https://pkg.jenkins.io/debian-stable/binary/${deb_file}"
if [[ -f ${deb_file} ]]; then
sudo dpkg -i ${deb_file}
sudo apt-get install -f --yes
Expand Down
2 changes: 1 addition & 1 deletion solution_template/jenkins/MainTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"metadata": {
"description": "Artifacts location"
},
"defaultValue": "https://raw.githubusercontent.com/Azure/azure-devops-utils/master/",
"defaultValue": "https://raw.githubusercontent.com/Azure/azure-devops-utils/v0.16.0/",
"type": "string"
},
"_artifactsLocationSasToken": {
Expand Down

0 comments on commit ddea2d2

Please sign in to comment.