Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit 5095380

Browse files
committed
[JENKINS-52028] -Support downloading plugins from the Incrementals repo
1 parent ec20d5e commit 5095380

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ RUN curl -fsSL ${JENKINS_URL} -o /usr/share/jenkins/jenkins.war \
5959

6060
ENV JENKINS_UC https://updates.jenkins.io
6161
ENV JENKINS_UC_EXPERIMENTAL=https://updates.jenkins.io/experimental
62+
ENV JENKINS_INCREMENTALS_REPO_MIRROR=https://repo.jenkins-ci.org/incrementals
6263
RUN chown -R ${user} "$JENKINS_HOME" /usr/share/jenkins/ref
6364

6465
# for main web interface:

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ During the download, the script will use update centers defined by the following
163163
* `JENKINS_UC_EXPERIMENTAL` - [Experimental Update Center](https://jenkins.io/blog/2013/09/23/experimental-plugins-update-center/).
164164
This center offers Alpha and Beta versions of plugins.
165165
Default value: https://updates.jenkins.io/experimental
166+
* `JENKINS_INCREMENTALS_REPO_MIRROR` -
167+
Defines Maven mirror to be used to download plugins from the
168+
[Incrementals repo](https://jenkins.io/blog/2018/05/15/incremental-deployment/).
169+
Default value: https://repo.jenkins-ci.org/incrementals
166170

167171
It is possible to override the environment variables in images.
168172

@@ -179,6 +183,11 @@ There are also custom version specifiers:
179183
For Jenkins LTS images
180184
(example: `git:latest`)
181185
* `experimental` - download the latest version from the experimental update center defined by the `JENKINS_UC_EXPERIMENTAL` environment variable (example: `filesystem_scm:experimental`)
186+
* `incrementals;org.jenkins-ci.plugins.workflow;2.19-rc289.d09828a05a74`
187+
- download the plugin from the [Incrementals repo](https://jenkins.io/blog/2018/05/15/incremental-deployment/).
188+
* For this option you need to specify `groupId` of the plugin.
189+
Note that this value may change between plugin versions without notice.
190+
182191

183192
### Script usage
184193

install-plugins.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ doDownload() {
6969
elif [[ "$version" == "experimental" && -n "$JENKINS_UC_EXPERIMENTAL" ]]; then
7070
# Download from the experimental update center
7171
url="$JENKINS_UC_EXPERIMENTAL/latest/${plugin}.hpi"
72+
elif [[ "$version" == incrementals* ]] ; then
73+
# Download from Incrementals repo: https://jenkins.io/blog/2018/05/15/incremental-deployment/
74+
# Example URL: https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/workflow/workflow-support/2.19-rc289.d09828a05a74/workflow-support-2.19-rc289.d09828a05a74.hpi
75+
local groupId incrementalsVersion
76+
arrIN=(${version//;/ })
77+
groupId=${arrIN[1]}
78+
incrementalsVersion=${arrIN[2]}
79+
url="${JENKINS_INCREMENTALS_REPO_MIRROR}/$(echo "${groupId}" | tr '.' '/')/${plugin}/${incrementalsVersion}/${plugin}-${incrementalsVersion}.hpi"
7280
else
7381
JENKINS_UC_DOWNLOAD=${JENKINS_UC_DOWNLOAD:-"$JENKINS_UC/download"}
7482
url="$JENKINS_UC_DOWNLOAD/plugins/$plugin/$version/${plugin}.hpi"

tests/install-plugins/pluginsfile/plugins.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ filesystem_scm:experimental # comment at the end
1919

2020
#
2121
# empty line
22+
23+
# Incrementals (JENKINS-52028)
24+
workflow-support:incrementals;org.jenkins-ci.plugins.workflow;2.19-rc289.d09828a05a74

0 commit comments

Comments
 (0)