-
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.
Merge pull request #2 from cloudbees-oss/use-jenkins-base-image
[FNDJEN-1482] - Use Jenkins base image to avoid workaround for Docker packaging limitations
- Loading branch information
Showing
2 changed files
with
9 additions
and
211 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,18 @@ | ||
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 | ||
FROM jenkins/jenkins:2.176.2 | ||
|
||
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 | ||
# Replace jenkins.war by CloudBees Jenkins Distribution WAR which includes plugins from CloudBees Assurance Program and other features | ||
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.