Skip to content

Latest commit

 

History

History
87 lines (66 loc) · 3.17 KB

README.md

File metadata and controls

87 lines (66 loc) · 3.17 KB

Build Status GitHub license

JIRO Masters

Defines the metadata for JIRO controllers (for container images among other things). It uses Jsonnet and follows some best practices.

How to add a new controller version?

If you want to just add a new controller following the template from jiro.libsonnet, you have to add a new instance the masters array in the file masters.jsonnet, calling the newController(controllerVersion, remotingVersion) constructor:

local jiro = import "jiro.libsonnet";

{
  # Latest references an ID, not the version that is used
  # but as the default id=version so it looks like we're using the version in most cases
  latest: "2.263.3",
  masters: {
    [master.id]: master for master in [
      jiro.newController("2.263.3", "4.5"),
      jiro.newController("2.263.2", "4.5"),
    ]
  },
}
$ curl -SJOL http://mirrors.jenkins.io/war-stable/2.222.1/jenkins.war
$ unzip -p jenkins.war META-INF/MANIFEST.MF | grep "Remoting-Embedded-Version"
Remoting-Embedded-Version: 4.2

How to add custom controller?

All fields in jiro.libsonnet can be overridden in the masters array elements, e.g. to define a jdk11 based master:

local jiro = import "jiro.libsonnet";

{
  latest: "2.235.3-jdk11",
  masters: {
    [master.id]: master for master in [
      jiro.newController("2.235.3", "4.3") {
        id: "%s-jdk11" % self.version,
        docker+: {
          from: "eclipsecbi/eclipse-temurin-coreutils:11-alpine",
        },
        pubkey: importstr 'jenkins-2.235.3-onward.war.pub.asc',
        key_fingerprint: 'FCEF32E745F2C3D5',
      },
    ]
  }
}

Building

To build all controllers as defined in masters.jsonnet, run

make all

To build a single controller, run

make <id>

where <id> is the controller's ID as specified in masters.jsonnet

Dependencies