Skip to content

Commit

Permalink
Merge pull request #63 from res0nance/hudson-to-jenkins
Browse files Browse the repository at this point in the history
Rename hudson to jenkins
  • Loading branch information
GLundh authored Oct 16, 2019
2 parents ff90dc9 + 7b5809a commit 78990a8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/sonyericsson/rebuild/RebuildAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import hudson.model.BooleanParameterValue;
import hudson.model.Cause;
import hudson.model.CauseAction;
import hudson.model.Hudson;
import hudson.model.Item;
import hudson.model.Job;
import hudson.model.ParameterValue;
Expand All @@ -50,6 +49,7 @@
import hudson.model.PasswordParameterValue;
import hudson.model.RunParameterValue;
import hudson.model.StringParameterValue;
import jenkins.model.Jenkins;
import net.sf.json.JSONArray;
import net.sf.json.JSONNull;
import net.sf.json.JSONObject;
Expand Down Expand Up @@ -231,7 +231,7 @@ public void parameterizedRebuild(Run currentBuild, StaplerResponse response) thr

List<Action> actions = constructRebuildActions(build, currentBuild.getAction(ParametersAction.class));

Hudson.getInstance().getQueue().schedule((Queue.Task) build.getParent(), 0, actions);
Jenkins.getInstance().getQueue().schedule2((Queue.Task) build.getParent(), 0, actions);
response.sendRedirect("../../");
}
}
Expand All @@ -250,7 +250,7 @@ public void nonParameterizedRebuild(Run currentBuild, StaplerResponse
getProject().checkPermission(Item.BUILD);

List<Action> actions = constructRebuildActions(build, null);
Hudson.getInstance().getQueue().schedule((Queue.Task) currentBuild.getParent(), 0, actions);
Jenkins.getInstance().getQueue().schedule2((Queue.Task) currentBuild.getParent(), 0, actions);
response.sendRedirect("../../");
}

Expand Down Expand Up @@ -309,7 +309,7 @@ public void doConfigSubmit(StaplerRequest req, StaplerResponse rsp) throws Servl
}

List<Action> actions = constructRebuildActions(build, new ParametersAction(values));
Hudson.getInstance().getQueue().schedule((Queue.Task) build.getParent(), 0, actions);
Jenkins.getInstance().getQueue().schedule2((Queue.Task) build.getParent(), 0, actions);

rsp.sendRedirect("../../");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
import hudson.matrix.MatrixConfiguration;
import hudson.Extension;
import hudson.model.Action;
import hudson.model.Hudson;
import hudson.model.Queue;
import hudson.model.Run;
import hudson.model.TransientBuildActionFactory;
import jenkins.model.Jenkins;

import java.util.Collection;

Expand All @@ -56,7 +56,7 @@ public Collection<? extends Action> createFor(Run build) {
if (hasRebuildAction) {
return emptyList();
}
for (RebuildValidator rebuildValidator : Hudson.getInstance().
for (RebuildValidator rebuildValidator : Jenkins.getInstance().
getExtensionList(RebuildValidator.class)) {
if (rebuildValidator.isApplicable(build)) {
return emptyList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

import hudson.model.Describable;
import hudson.model.Descriptor;
import hudson.model.Hudson;
import jenkins.model.Jenkins;

import org.kohsuke.stapler.DataBoundConstructor;

/**
Expand Down Expand Up @@ -57,7 +58,7 @@ public String toString() {

@Override
public Descriptor getDescriptor() {
return Hudson.getInstance().getDescriptorOrDie(RebuildConfiguration.class);
return Jenkins.getInstance().getDescriptorOrDie(RebuildConfiguration.class);
}

/**
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/com/sonyericsson/rebuild/Rebuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@
*/
package com.sonyericsson.rebuild;


import hudson.Extension;
import hudson.model.Hudson;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.model.listeners.RunListener;
import jenkins.model.Jenkins;

/**
* Runtime Listner class which allows the user to rebuild the parameterized build.
Expand All @@ -48,7 +47,7 @@ public Rebuilder() {

@Override
public void onCompleted(Run build, TaskListener listener) {
for (RebuildValidator rebuildValidator : Hudson.getInstance().
for (RebuildValidator rebuildValidator : Jenkins.getInstance().
getExtensionList(RebuildValidator.class)) {
if (rebuildValidator.isApplicable(build)) {
return;
Expand Down

0 comments on commit 78990a8

Please sign in to comment.