uk.co.codera.ci.tooling.jenkins.DeleteJobCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codera-ci-tooling-service-jenkins Show documentation
Show all versions of codera-ci-tooling-service-jenkins Show documentation
Provides integration with jenkins such as creating and deleting jobs automatically.
The newest version!
package uk.co.codera.ci.tooling.jenkins;
import org.apache.commons.lang3.ArrayUtils;
public class DeleteJobCommand extends JenkinsCommand {
private static final String COMMAND_NAME = "delete-job";
private final String jobName;
private DeleteJobCommand(Builder builder) {
super(builder);
this.jobName = builder.jobName;
}
public static Builder aDeleteJobCommand() {
return new Builder();
}
@Override
public String getName() {
return COMMAND_NAME;
}
@Override
public String[] getArguments() {
return ArrayUtils.addAll(super.getArguments(), this.jobName);
}
public static class Builder extends JenkinsCommand.Builder {
private String jobName;
public Builder jobName(String jobName) {
this.jobName = jobName;
return this;
}
@Override
public DeleteJobCommand build() {
return new DeleteJobCommand(this);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy