Remove obsolete methods to retrieve the GitLabPushTrigger.DescriptorImpl
This commit is contained in:
parent
f8077ba6e3
commit
d6d4ad9786
|
@ -191,15 +191,6 @@ public class GitLabPushTrigger extends Trigger<Job<?, ?>> implements WebHookTrig
|
|||
mergeRequestHookTriggerHandler.handle(this, job, hook);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DescriptorImpl getDescriptor() {
|
||||
return DescriptorImpl.get();
|
||||
}
|
||||
|
||||
public static DescriptorImpl getDesc() {
|
||||
return DescriptorImpl.get();
|
||||
}
|
||||
|
||||
@Extension
|
||||
public static class DescriptorImpl extends TriggerDescriptor {
|
||||
|
||||
|
@ -441,10 +432,5 @@ public class GitLabPushTrigger extends Trigger<Job<?, ?>> implements WebHookTrig
|
|||
public boolean getIgnoreCertificateErrors() {
|
||||
return ignoreCertificateErrors;
|
||||
}
|
||||
|
||||
public static DescriptorImpl get() {
|
||||
return Trigger.all().get(DescriptorImpl.class);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import hudson.Extension;
|
|||
import hudson.init.InitMilestone;
|
||||
import hudson.init.Initializer;
|
||||
import hudson.model.AbstractProject;
|
||||
import hudson.triggers.Trigger;
|
||||
import hudson.util.FormValidation;
|
||||
import jenkins.model.GlobalConfiguration;
|
||||
import jenkins.model.Jenkins;
|
||||
|
@ -104,7 +105,7 @@ public class GitLabConnectionConfig extends GlobalConfiguration {
|
|||
public static void migrate() throws IOException {
|
||||
GitLabConnectionConfig gitLabConfig = (GitLabConnectionConfig) Jenkins.getInstance().getDescriptor(GitLabConnectionConfig.class);
|
||||
if (!gitLabConfig.migrationFinished) {
|
||||
GitLabPushTrigger.DescriptorImpl oldConfig = GitLabPushTrigger.getDesc();
|
||||
GitLabPushTrigger.DescriptorImpl oldConfig = Trigger.all().get(GitLabPushTrigger.DescriptorImpl.class);
|
||||
gitLabConfig.connections = new ArrayList<GitLabConnection>();
|
||||
gitLabConfig.connections.add(new GitLabConnection(oldConfig.getGitlabHostUrl(), oldConfig.getGitlabHostUrl(), oldConfig.getGitlabApiToken(),
|
||||
oldConfig.getIgnoreCertificateErrors()));
|
||||
|
|
Loading…
Reference in New Issue