How to move a job remotely.
- CloudBees Core
- CloudBees Core on modern cloud platforms - Managed Master
- CloudBees Core on modern cloud platforms - Operations Center
- CloudBees Core on traditional platforms - Client Master
- CloudBees Core on traditional platforms - Operations Center
- CloudBees Jenkins Enterprise
- CloudBees Jenkins Enterprise - Managed Master
- CloudBees Jenkins Enterprise - Operations Center
- CloudBees Jenkins Platform - Client Master
- CloudBees Jenkins Platform - Operations Center
- CloudBees Jenkins Distribution
- Jenkins LTS
If your master is connected to a CJOC instance, then the simplest solution might be to use the Move / Copy / Promote functionality provided by CJOC.
See Moving, Copying, or Promoting Items Using the Jenkins CLI for how to execute these operations remotely.
NOTE:: This approach allows you the option to also move build history.
There doesn’t appear to be a move operation, so the simplest solution might be to use a combination of copy and then delete operations to simulate a move operation.
NOTE: This approach will move the job config only. It does not move build history or build artifacts.
The root URL for this instance is
The admin username and API token for this instance is
curl -s -XPOST 'http://localhost:8080/createItem?name=moved-example-job&mode=copy&from=example-job' -u admin:token -H "$CRUMB" -H "Content-Type:text/xml"
The above copies job
example-job to a new job named
curl -X POST http://localhost:8080/job/example-job/doDelete -u admin:token -H "$CRUMB"
The above example deletes the job