Skip to content

Commit

Permalink
Merge pull request #964 from slide/gh_954
Browse files Browse the repository at this point in the history
Fix install-plugins.sh for update-center changes
  • Loading branch information
slide authored Aug 28, 2020
2 parents 2be1a3c + 778e387 commit d5dc7f1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions install-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,11 @@ main() {
echo "Registering preinstalled plugins..."
installedPlugins="$(installedPlugins)"

# Check if there's a version-specific update center, which is the case for LTS versions
# Get the update center URL based on the jenkins version
jenkinsVersion="$(jenkinsMajorMinorVersion)"
if curl -fsL -o /dev/null "$JENKINS_UC/$jenkinsVersion"; then
JENKINS_UC_LATEST="$JENKINS_UC/$jenkinsVersion"
jenkinsUcJson=$(curl -Ls -o /dev/null -w "%{url_effective}" "${JENKINS_UC}/update-center.json?version=${jenkinsVersion}")
if [ -n "${jenkinsUcJson}" ]; then
JENKINS_UC_LATEST=${jenkinsUcJson//update-center.json/}
echo "Using version-specific update center: $JENKINS_UC_LATEST..."
else
JENKINS_UC_LATEST=
Expand Down

0 comments on commit d5dc7f1

Please sign in to comment.