-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #502 from basil/lts
Require Jenkins 2.414.3 LTS or newer
- Loading branch information
Showing
5 changed files
with
142 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
buildPlugin(useContainerAgent: true, configurations: [ | ||
[platform: 'linux', jdk: 21], | ||
[platform: 'linux', jdk: 17], | ||
[platform: 'linux', jdk: 11], | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package hudson.model; | ||
|
||
import hudson.model.queue.CauseOfBlockage; | ||
|
||
/** | ||
* Mock version of {@link Queue.BuildableItem} (which is final) that avoids {@link jenkins.model.TransientActionFactory}. | ||
*/ | ||
public class MockBuildableItem extends Queue.Item { | ||
|
||
/** | ||
* Create a new mock buildable item. | ||
* | ||
* @param item The item. | ||
*/ | ||
public MockBuildableItem(Queue.Item item) { | ||
super(item); | ||
} | ||
|
||
@SuppressWarnings("deprecation") // avoid TransientActionFactory | ||
@Override | ||
public <T extends Action> T getAction(Class<T> type) { | ||
for (Action a : getActions()) { | ||
if (type.isInstance(a)) { | ||
return type.cast(a); | ||
} | ||
} | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean isBuildable() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public CauseOfBlockage getCauseOfBlockage() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
void enter(Queue q) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
boolean leave(Queue q) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package hudson.model; | ||
|
||
import hudson.model.queue.CauseOfBlockage; | ||
import hudson.model.queue.FutureImpl; | ||
import java.util.List; | ||
import java.util.concurrent.atomic.AtomicLong; | ||
|
||
/** | ||
* Mock version of {@link Queue.WaitingItem} (which is final) that avoids {@link jenkins.model.TransientActionFactory}. | ||
*/ | ||
public class MockWaitingItem extends Queue.Item { | ||
|
||
private static final AtomicLong COUNTER = new AtomicLong(0); | ||
|
||
/** | ||
* Create a new mock waiting item. | ||
* | ||
* @param project The project. | ||
* @param actions The actions. | ||
*/ | ||
public MockWaitingItem(Queue.Task project, List<Action> actions) { | ||
super(project, actions, COUNTER.incrementAndGet(), new FutureImpl(project)); | ||
} | ||
|
||
@SuppressWarnings("deprecation") // avoid TransientActionFactory | ||
@Override | ||
public <T extends Action> T getAction(Class<T> type) { | ||
for (Action a : getActions()) { | ||
if (type.isInstance(a)) { | ||
return type.cast(a); | ||
} | ||
} | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean isBuildable() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public CauseOfBlockage getCauseOfBlockage() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
void enter(Queue q) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
boolean leave(Queue q) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
} |