uk.co.codera.ci.tooling.jenkins.JenkinsCommand 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;
public abstract class JenkinsCommand {
private final JenkinsConnectionDetails jenkinsConfiguration;
protected JenkinsCommand(Builder, ?> builder) {
this.jenkinsConfiguration = builder.jenkinsConfiguration;
}
public abstract String getName();
public String[] getArguments() {
return new String[] { "-s", this.jenkinsConfiguration.getServerUrl(), getName() };
}
public void execute(JenkinsCommandLineInterfaceInvoker cliInvoker) {
cliInvoker.invoke(getArguments());
}
@SuppressWarnings("unchecked")
public abstract static class Builder {
private JenkinsConnectionDetails jenkinsConfiguration;
public T with(JenkinsConnectionDetails jenkinsConfiguration) {
this.jenkinsConfiguration = jenkinsConfiguration;
return (T) this;
}
public abstract C build();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy