-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Jenkins base image to avoid workaround for Docker packaging limit…
…ations
- Loading branch information
1 parent
45f6cc4
commit f05ece5
Showing
2 changed files
with
8 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,16 @@ | ||
FROM jenkins/jenkins:2.176.2 as install_scripts_source | ||
FROM cloudbees/cloudbees-jenkins-distribution:2.176.2.3 as war_source | ||
|
||
FROM cloudbees/cloudbees-jenkins-distribution:2.176.2.3 | ||
COPY --from=install_scripts_source /usr/local/bin/jenkins-support /usr/local/bin/jenkins-support | ||
COPY --from=install_scripts_source /usr/local/bin/install-plugins.sh /usr/local/bin/install-plugins.sh | ||
|
||
ENV JENKINS_UC http://jenkins-updates.cloudbees.com | ||
ENV JENKINS_INCREMENTALS_REPO_MIRROR https://repo.jenkins-ci.org/incrementals | ||
|
||
# Workaround https://github.com/jenkinsci/docker/issues/857 | ||
USER root | ||
RUN mkdir -p /usr/share/jenkins/ && ln -s /usr/share/cloudbees-jenkins-distribution/cloudbees-jenkins-distribution.war /usr/share/jenkins/jenkins.war | ||
USER cloudbees-jenkins-distribution | ||
FROM jenkins/jenkins:2.176.2 | ||
COPY --from=war_source /usr/share/cloudbees-jenkins-distribution/cloudbees-jenkins-distribution.war /usr/share/jenkins/jenkins.war | ||
|
||
# Startup all plugins included into the CloudBees Jenkins Distribution bundle | ||
ENV JAVA_OPTS "-Dcom.cloudbees.jenkins.cjp.installmanager.CJPPluginManager.allRequired=true" | ||
|
||
# Install extra plugins | ||
# REF_ROOT is consumed by jenkins-support in the https://github.com/jenkinsci/docker/issues/861 workaround | ||
ENV REF_ROOT=/usr/share/cloudbees-jenkins-distribution/ref | ||
ENV REF=${REF_ROOT}/plugins | ||
COPY plugins.txt /usr/share/cloudbees-jenkins-distribution/ref/plugins.txt | ||
RUN bash /usr/local/bin/install-plugins.sh < /usr/share/cloudbees-jenkins-distribution/ref/plugins.txt | ||
# Install additional plugins including JCasC | ||
ENV JENKINS_UC http://jenkins-updates.cloudbees.com | ||
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt | ||
RUN bash /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt | ||
|
||
# Apply JCasC | ||
# Apply JCasC configuration | ||
COPY jenkins.yaml /cfg/jenkins.yaml | ||
ENV CASC_JENKINS_CONFIG /cfg/jenkins.yaml | ||
|
||
# Temporary override for jenkins-support to support custom ref-roots there | ||
# TODO: remove once https://github.com/jenkinsci/docker/issues/861 is fixed | ||
COPY jenkins-support /usr/local/bin/jenkins-support |
This file was deleted.
Oops, something went wrong.