Class JobUpdater
java.lang.Object
org.jenkins_ci.plugins.flexible_publish.JobUpdater
Utilities for the script console
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringlist(AbstractProject<?, ?> project) List the publishers that are enabled on the project, and that can be moved into the Flexible publishimport static org.jenkins_ci.plugins.flexible_publish.JobUpdater.* def job = hudson.model.Hudson.instance.getItem('xxx') list job// Or, if you like doing it the hard way ...static Stringlist(AbstractProject<?, ?> project, boolean listCanMove) static StringlistCanMove(AbstractProject<?, ?> project) List the publishers that are enabled on the project, and that can be moved into the Flexible publishimport static org.jenkins_ci.plugins.flexible_publish.JobUpdater.* def job = hudson.model.Hudson.instance.getItem('xxx') listCanMove jobstatic StringlistCannotMove(AbstractProject<?, ?> project) List the publishers that are enabled on the project, and but cannot be moved into the Flexible publishimport static org.jenkins_ci.plugins.flexible_publish.JobUpdater.* def job = hudson.model.Hudson.instance.getItem('xxx') listCannotMove job// Or, if you like doing it the hard way ...static booleanmoveAllPublishers(AbstractProject<?, ?> project) Move all publishers that are "allowed" to be moved into the Flexible publish Only use this method if you really know what you're doing - or don't care about the consequences For those that like to live on the edge!static booleanmovePublisher(AbstractProject<?, ?> project, String publisherName) Move a publisher from the Post-build Actions and into the Flexible publish publisher For a freestyle project called 'xxx', to move the 'Archive the artifacts' step:import static org.jenkins_ci.plugins.flexible_publish.JobUpdater.* def job = hudson.model.Hudson.instance.getItem('xxx') movePublisher job, 'archive the artifacts'Once executed, go to the configure page to check that everything looks OK, then save the configuration
-
Constructor Details
-
JobUpdater
public JobUpdater()
-
-
Method Details
-
movePublisher
public static boolean movePublisher(AbstractProject<?, ?> project, String publisherName) throws IOExceptionMove a publisher from the Post-build Actions and into the Flexible publish publisher For a freestyle project called 'xxx', to move the 'Archive the artifacts' step:import static org.jenkins_ci.plugins.flexible_publish.JobUpdater.* def job = hudson.model.Hudson.instance.getItem('xxx') movePublisher job, 'archive the artifacts'Once executed, go to the configure page to check that everything looks OK, then save the configuration- Throws:
IOException
-
moveAllPublishers
Move all publishers that are "allowed" to be moved into the Flexible publish Only use this method if you really know what you're doing - or don't care about the consequences For those that like to live on the edge!- Throws:
IOException
-
list
List the publishers that are enabled on the project, and that can be moved into the Flexible publishimport static org.jenkins_ci.plugins.flexible_publish.JobUpdater.* def job = hudson.model.Hudson.instance.getItem('xxx') list job// Or, if you like doing it the hard way ...org.jenkins_ci.plugins.flexible_publish.JobUpdater.list(hudson.model.Hudson.instance.getItem('xxx')) -
listCanMove
List the publishers that are enabled on the project, and that can be moved into the Flexible publishimport static org.jenkins_ci.plugins.flexible_publish.JobUpdater.* def job = hudson.model.Hudson.instance.getItem('xxx') listCanMove job -
listCannotMove
List the publishers that are enabled on the project, and but cannot be moved into the Flexible publishimport static org.jenkins_ci.plugins.flexible_publish.JobUpdater.* def job = hudson.model.Hudson.instance.getItem('xxx') listCannotMove job// Or, if you like doing it the hard way ...org.jenkins_ci.plugins.flexible_publish.JobUpdater.list(hudson.model.Hudson.instance.getItem('xxx')) -
list
-