Custom WAR Packager (CWP) allows building ready-to-fly Jenkins packages using a YAML specification.The tool can produce Docker images, WAR files, and Jenkinsfile Runner docker images (aka single-shot Jenkins masters).These bundles may include Jenkins core, plugins, extra libraries, and self-configuration via Groovy Hook Scriptsor Configuration-as-Code Plugin YAML files.
See this blog post for more information.
- Installing and Running Jenkins in Windows Posted on 2015/11/06 by thiscouldbebetter Follow the steps below to install, configure, run, and test Jenkins on a computer running Microsoft Windows.
- Permalink to the latest: 2.167: SHA-1: eea9bbb92a6f06f0aadee3513ab9e1, SHA-256: 5218a0db16e5815eec7f286006b677d935bc4be7a3ea9fef8aba087041c8a37e.
I'm using OS Windows. I'm trying to delete jenkins, that was installed as jenkins.war file. I need to delete it, because I made a lot of mistakes while configuring it. I was trying to run the. Jenkins.war uninstall but it does not work ( in this occurance the popup window opens and suggest me to select the program which will run this command ). Now let’s download Jenkins war file. Navigate to your windows service to verify if the service is started. Verify TomCat Jenkins Service in Windows Services. Jump to WAR file - The Web application ARchive (WAR) file version of Jenkins can be. Open up a terminal/command prompt window to the download. The same steps can be applied to install Jenkins on Ubuntu, MAC & Windows (using linux VM). Download Jenkins war File. I will again use the wget command to. Jan 13, 2019 - Jenkins may be installed on either Windows or Unix platforms, but we will focus on Windows installation only. Prerequisites: Before you.
Demo
- Jenkins WAR - all latest - bundles master branches for core and some key libraries/modules
- Jenkins WAR - all latest with Maven - same as a above, but with Maven
- External Task Logging to Elasticsearch -runs External Logging demo and preconfigures it using System Groovy Hooks.The demo is packaged with Docker, and it provides a ready-to-fly Docker Compose package.
- Configuration as Code - configuring WAR withConfiguration-as-Code Plugin via YAML
- Core components build - demonstrates how to modify core components (libraries, modules)
- Custom WAR Packager CI Demo - Standalone demo with an integrated CI flow
- Jenkinsfile Runner - Packaging of Docker image for Jenkinsfile Runner
Usage
The tool offers a CLI interface and a Maven Plugin wrapper.
CLI
After the build the generated WAR file will be put to tmp/output/target/${artifactId}.war
.
To run the tool in a demo mode with this config, use the following command:
Invoke the tool without options to get a full CLI options list.
Maven
Maven plugin runs the packager and generates the artifact.The artifact will be put to 'target/custom-war-packager-maven-plugin/output/target/${bundle.artifactId}.war'and added to the project artifacts.
Note that this plugin invokes Maven-in-Maven,and that it won't pass build options to the plugin.Configuration file can be used to configure the downstream builder.
Jenkins 2 Download
Prerequisites
- Maven 3.5.0 or above
- Java 8
- Git (if any Git sources are defined)
Custom WAR Packager offers a Docker Image which bundles all the required tools.
Configuration file
Example:
There are more options available.See the linked demos and the automated tests for examples.
Please note that given to the build workspace being defaulted to '/build', the Jenkinsfile-runner version used must be at least 1.0-beta-7.
BOM support
The plugin supports Bill of Materials (BOM), described inJEP-309, as an input.
If BOM is defined, Custom WAR Packager will load plugin and component dependenciesfrom there. In case we want BOM to specify the core version, the bomIncludeWar
flag must be set to true
.The example below takes the input from BOM and produces custom WAR and Docker packages.
An example of such configuration is availablehere.
Plugins from POM
In order to simplify packaging for development versions,it is possible to link Custom War Packager to the POM fileso that it takes plugins to be bundled from there.
If the pom
option is set, all dependencies will be added, including test ones.The current parent will be also bundled unless the pomIgnoreRoot
flag is set.
In the same way as BOM does, we can specify the core version from the pom file.If the global flag bomIncludeWar
is true
and the pom sets the jenkins-war.version
, the jenkins.version
property or it contains a dependency onorg.jenkins-ci.main:jenkins-core
or org.jenkins-ci.main:jenkins-war
the war section in yml filewill be omitted. Consequently, if the flag is set to true
and the pom file does not configure the core, then the build fails.
Example is available here.
Advanced features
Features:
- Rebuilding Jenkins core with custom dependencies (e.g., Remoting or Stapler)
- Adding extra libraries to the Jenkins core so that they can be used in extensions
Limitations
Currently, the tool is in the alpha state.It has some serious limitations:
Installing Jenkins On Windows
- All built artifacts with Git source are being installed to the local repository
- Versions are unique for every commit, so beware of local repo pollution
- System properties work only for a custom
jenkins.util.SystemProperties
class defined in the core- Use Groovy Hook Scripts if you need to set up other system properties
libPatches
steps bundles only a specified JAR file, but not its dependenciesDependencies need to be explicitly packaged as well if they change compared to the base WAR filelibExcludes
can be used to remove dependencies which are not required anymore