11.2.4.4 Edit the Jenkins Server Build Files

By default, the cicdw jenkins-server create command will write its configuration files to a temporary folder. By including the --build-path parameter, this can be changed to a more permanent location. Add the --only-generate flag to generate build files without creating a docker image.

cicdw jenkins-server create --only-generate --build-path my/build/files/location

This will generate three files inside that folder.

  • Dockerfile - An instruction on how to build the docker image for the Jenkins server
  • plugins.txt - A list of plugins to preinstall in the Jenkins server
  • casc.yaml - Configuration instructions for the Jenkins server

Refer to the official JCasC documentation for information on how to edit these files.

To use the edited files, add the --from-build-files flag to the cicdw jenkins-server create command. Note that you will have to remove any previously created server before you can create a new one.

cicdw jenkins-server remove
cicdw jenkins-server create --build-path my/build/files/location --from-build-files