Sign inSign up

forjdevops/jenkins

By forjdevops

•Updated almost 7 years ago

Base image for your Jenkins service with preconfigured features and plugins

Image
0

3.2K

forjdevops/jenkins repository overview

⁠Jenkins

This repository contains automation scripts to build jenkins from scratch with plugins and pre-initialized configuration data. It has been strongly inspired by the public Docker image⁠ (but not used as reference) and enhanced.

Why?

We introduced several new features, like:

  • jenkins features⁠ to help building easily a new jenkins image, by selecting some wanted features (Combination of plugins/config/scripts)
  • startup scripts capability

⁠To run it

Usually, you won't do that, directly, because you want to build your own jenkins with the list of features you need. But if you want to see a basic version of jenkins, you can do the following:

docker run -it --rm -p 8080:8080 forjdevops/jenkins

⁠Jenkins version and docker tags

A docker image is versionned through his tag version and then pushed. Then on your Dockerfile, you refer to one version.

Ex:

FROM forjdevops/jenkins:2.x-latest

We deliver several different jenkins version and maintain some of them. For docker image tagging, we follow those rules:

  • Some version of jenkins (3 versions) gets a tag prefixed by the project release ie <ReleaseVersion>_<JenkinsVersion>.

    Ex: 0.2_1.658, 0.2_1.642, 0.2_2.50

  • A branch of version. We maintain 3 different branches: 1.6x-latest, 1.6x-stable and 2.x. Latest version of a branch gets named as <ReleaseVersion>_<BranchVersion>-latest.

    Ex: 0.2_2.x-latest

  • <ReleaseVersion>_latest will refer to the latest version for a dedicated version of this project.

    Ex: 0.2_latest

  • latest_<jenkins_version|latest> will refer to the HEAD of the jenkins-ci repository. It will be updated any time a PR on jenkins-ci is merged.

  • latest is the default tag for docker. We use it to refer to the latest version of jenkins, as found in http://pkg.jenkins.io/redhat/⁠

    Ex: latest refer to the latest version of jenkins and version of this project ie is identical to latest_latest

To get a list of published and available versions, connect to Docker Registry⁠

This project maintains a collection of tags, ie a limited collection of version of jenkins. To get the list of maintained version, read releases.lst⁠

⁠To build your own Jenkins image

This is the most common use case as this image is a base image for your own Jenkins instance.

3 steps:

  1. Installing jplugins to manage your jenkins features and plugins
# Download and install jplugins
wget -o jplugins https://github.com/forj-oss/jplugins/releases/download/0.0.6/jplugins
chmod +x jplugins
# Get jenkins pre-installed plugins list
docker run --rm forjdevops/jenkins cat /usr/share/jenkins/ref/jplugins-preinstalled.lst > jplugins-preinstalled.lst
  1. create a jplugins.lst with the list of plugins/features, create the jenkins lock file with list of plugins and features to install.

ex:

echo "feature:pipeline
feature:basic-security
plugin:blue-ocean" > jplugins.lst
./jplugins init

To get list of available feature, browse https://github.com/forj-oss/jenkins-install-inits⁠

  1. create your Dockerfile based on forjdevops/jenkins, add jplugins.lock and build it.
FROM forjdevops/jenkins
USER root

COPY jplugins.lock $JENKINS_DATA_REF
ARG JENKINS_INSTALL_INITS_URL=https://github.com/forj-oss/jenkins-install-inits
RUN git clone $JENKINS_INSTALL_INITS_URL /tmp/jenkins-install-inits && \
    /usr/local/bin/jplugins install --jenkins-home $JENKINS_DATA_REF --lock-file $JENKINS_DATA_REF/jplugins.lock --features-repo-path=/tmp/jenkins-install-inits

USER jenkins

Then build it.

For possible features, see https://github.com/forj-oss/jenkins-install-inits⁠

⁠For more details about Jenkins

See public Docker image⁠

FORJ Team

Tag summary

Content type

Image

Digest

Size

227.4 MB

Last updated

almost 7 years ago

docker pull forjdevops/jenkins