Japanese version of this document is README_ja.md
Jenkins plugin to copy a job in a build step.
Job Copy Builder is a Jenkins plugin. This plugin provides Copy Job build step:
- It makes a new job from an existing job.
- This can be configured as a build step, so you can copy multiple jobs in one build execution with multiple build steps.
- You specify following parameters.
- From Job Name
- Variable expressions can be used.
- To Job Name
- Variable expressions can be used.
- Overwite
- Specifies whether to overwrite if the destination job already exists.
- From Job Name
- Additional operations will be performed when copying.
- Enable Job: Enabling the destination job if the source job is disabled.
- Replace String: Replace strings in a job configuration.
- Source and destination strings can contain variable expressions.
- Additional operation can be extended by using [the Jenkins extention point featere] (https://wiki.jenkins-ci.org/display/JENKINS/Extension+points).
- The job contains Copy Job build steps must run on the master node.
This plugin works as following:
- Reads the configuration xml (config.xml) of the copying job.
- Applies the operations to the configuration xml string.
- Create a new job with the processed configuration xml string.
New additional operations can be added with extending JobcopyOperation
, overriding the following method:
public abstract String JobcopyOperation::perform(String xmlString, String encoding, EnvVars env, PrintStream logger);
Or, you can use AbstractXmlJobcopyOperation
, which provides you a parsed XML Document node, overriding the following method:
public abstract String AbstractXmlJobcopyOperation::perform(Document doc, EnvVars env, PrintStream logger);
- Add new operation that replaces strings with regular expressions.