uk.co.codera.ci.tooling.jenkins.JenkinsJobDeleter 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 uk.co.codera.ci.tooling.scm.ScmEvent;
import uk.co.codera.ci.tooling.scm.ScmEventListener;
import uk.co.codera.ci.tooling.template.TemplateService;
public class JenkinsJobDeleter implements ScmEventListener {
private final TemplateService jobNameFactory;
private final JenkinsService jenkinsService;
public JenkinsJobDeleter(TemplateService jobNameFactory, JenkinsService jenkinsService) {
this.jobNameFactory = jobNameFactory;
this.jenkinsService = jenkinsService;
}
@Override
public void on(ScmEvent event) {
String jobName = this.jobNameFactory.create(event);
this.jenkinsService.deleteJob(jobName);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy