Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to Jenkins LTS Version 2.289.2 - to release JENKINS-64639 #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
3 changes: 3 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.adoc
_extends: .github
tag-template: join-$NEXT_MINOR_VERSION
12 changes: 12 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Release Drafter
on:
push:
branches:
- master
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5.14.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/target/
/work/
/work/

# IDEA
.idea
*.iml
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
buildPlugin()
47 changes: 33 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.600</version>
<version>4.16</version>
<relativePath />
</parent>

<artifactId>join</artifactId>
Expand Down Expand Up @@ -35,37 +36,59 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>matrix-project</artifactId>
<version>1.6</version>
<version>1.18</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>parameterized-trigger</artifactId>
<version>2.26</version>
<version>2.30</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>downstream-ext</artifactId>
<version>1.7</version>
<version>1.8</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>maven-plugin</artifactId>
<version>2.12</version>
<version>3.7</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>flexible-publish</artifactId>
<version>0.15.2</version>
<version>0.16.1</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>mailer</artifactId>
<version>1.32.1</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness-tools</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<!--
<dependency>
<groupId>org.jenkins-ci</groupId>
<artifactId>htmlunit</artifactId>
<version>2.6-jenkins-6</version>
<scope>test</scope>
</dependency>
-->
</dependencies>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jenkins.version>2.289.2</jenkins.version>
<java.level>8</java.level>
</properties>

<scm>
Expand All @@ -88,21 +111,17 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.4</version>
<version>2.7</version>
<configuration>
<formats>
<format>xml</format>
</formats>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<xmlOutput>true</xmlOutput>
</configuration>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.1.4</version>
</plugin>
</plugins>
</reporting>
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/join/JoinTrigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ public class JoinTrigger extends Recorder implements DependecyDeclarer, MatrixAg

private String joinProjects;

// https://www.jenkins.io/blog/2018/01/13/jep-200/ Refusing to marshal join.JoinTrigger for security reasons; see https://jenkins.io/redirect/class-filter/
// resources/META-INF/hudson.remoting.ClassFilter with Entry join.JoinTrigger
private DescribableList<Publisher,Descriptor<Publisher>> joinPublishers =
new DescribableList<Publisher,Descriptor<Publisher>>(Saveable.NOOP);

Expand Down Expand Up @@ -500,7 +502,7 @@ public static class ItemListenerImpl extends ItemListener {
public void onRenamed(Item item, String oldName, String newName) {
// update BuildTrigger of other projects that point to this object.
// can't we generalize this?
for( Project<?,?> p : Jenkins.getInstance().getProjects() ) {
for( Project<?,?> p : Jenkins.get().getProjects() ) {
BuildTrigger t = p.getPublishersList().get(BuildTrigger.class);
if ((t!=null) && (t.onJobRenamed(oldName,newName))) {
try {
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/META-INF/hudson.remoting.ClassFilter
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
join.JoinTrigger
1 change: 1 addition & 0 deletions src/main/resources/join/JoinTrigger/config.jelly
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:local="local">
<d:taglib uri="local">
<d:tag name="blockWrapperTable">
Expand Down
6 changes: 3 additions & 3 deletions src/main/webapp/help/postbuild.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Run certain post-build actions once the join is achieved. The authors of the post-build actions
did not have the join plugin in mind when writing their actions, so only a select few are shown here.

<p>The join plugin can work with the paramaterized-trigger plugin, version 2.0 or later. Earlier versions
<p>The join plugin can work with the paramaterized-trigger plugin, version 2.30 or later. Earlier versions
will experience a NPE when started by the join plugin.

<p>If there is a post-build action you would like to see supported, <a href="http://issues.hudson-ci.org/secure/CreateIssue!default.jspa">please file an issue</a>. Use the 'join' component.
But do <a href="http://issues.hudson-ci.org/secure/IssueNavigator.jspa?mode=hide&reset=true&jqlQuery=project+%3D+HUDSON+AND+status+in+%28Open%2C+%22In+Progress%22%2C+Reopened%29+AND+component+%3D+%27join%27">check the list of join plugin issues</a> first.
<p>If there is a post-build action you would like to see supported, <a href="https://issues.jenkins.io/secure/CreateIssue!default.jspa">please file an issue</a>. Use the 'join' component.
But do <a href="https://issues.jenkins.io/secure/IssueNavigator.jspa?mode=hide&reset=true&jqlQuery=project+%3D+JENKINS+AND+status+in+%28Open%2C+%22In+Progress%22%2C+Reopened%29+AND+component+%3D+%27join-plugin%27">check the list of join plugin issues</a> first.
</div>
12 changes: 3 additions & 9 deletions src/test/java/join/BasicJoinPluginTest.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
package join;

import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.Descriptor;
import hudson.model.FreeStyleProject;
import hudson.model.Saveable;
import hudson.model.*;
import hudson.plugins.parameterizedtrigger.AbstractBuildParameters;
import hudson.plugins.parameterizedtrigger.BuildTriggerConfig;
import hudson.plugins.parameterizedtrigger.ResultCondition;
Expand All @@ -14,9 +10,7 @@
import org.apache.commons.lang.StringUtils;
import org.jvnet.hudson.test.HudsonTestCase;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.*;

/**
*
Expand Down Expand Up @@ -217,7 +211,7 @@ public <T extends AbstractBuild<?,?>> void afterFinished(List<T> builds) {
}

public FreeStyleProject createFreeStyleProjectWithNoQuietPeriod() throws Exception {
final FreeStyleProject freestyleProject = createFreeStyleProject();
final FreeStyleProject freestyleProject = createFreeStyleProject("FreeStyle_" + UUID.randomUUID());
freestyleProject.setQuietPeriod(0);
return freestyleProject;
}
Expand Down
18 changes: 8 additions & 10 deletions src/test/java/join/JoinTriggerAllCombinationsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@
import hudson.model.AbstractProject;
import hudson.model.Cause;
import hudson.model.FreeStyleProject;
import hudson.model.Hudson;
import jenkins.model.Jenkins;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.jvnet.hudson.test.ExtractResourceSCM;
import org.jvnet.hudson.test.ToolInstallations;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.logging.Logger;

/**
Expand All @@ -47,7 +45,7 @@ public class JoinTriggerAllCombinationsTest extends BasicJoinPluginTest {
@Override
public AbstractProject<?, ?> apply(JoinTriggerAllCombinationsTest from) {
try {
MavenModuleSet mavenProject = from.createMavenProject();
MavenModuleSet mavenProject = from.jenkins.createProject(MavenModuleSet.class, "Maven_" + UUID.randomUUID());
mavenProject.setQuietPeriod(0);
mavenProject.setScm(new ExtractResourceSCM(getClass().getResource("maven-empty-mod.zip")));

Expand All @@ -62,7 +60,7 @@ public class JoinTriggerAllCombinationsTest extends BasicJoinPluginTest {
@Override
public AbstractProject<?, ?> apply(JoinTriggerAllCombinationsTest from) {
try {
MatrixProject matrixProject = from.createMatrixProject();
MatrixProject matrixProject = from.jenkins.createProject(MatrixProject.class, "Matrix_" + UUID.randomUUID());
matrixProject.setQuietPeriod(0);
return matrixProject;
} catch (Exception e) {
Expand Down Expand Up @@ -114,14 +112,14 @@ public JoinTriggerAllCombinationsTest(Class<?> splitProjClass, Class<?> intProjC
@Test
public void joinProjectShouldBeTriggered() throws Exception {
assertNotNull(splitProject);
configureDefaultMaven();
ToolInstallations.configureDefaultMaven();
AbstractProject<?,?> splitProject = projectType2Supplier.get(splitProjClass).apply(this);
AbstractProject<?,?> intProject = projectType2Supplier.get(intProjClass).apply(this);
AbstractProject<?,?> joinProject = projectType2Supplier.get(joinProjClass).apply(this);
addProjectToSplitProject(splitProject, intProject);
addJoinTriggerToSplitProject(splitProject, joinProject);
Hudson.getInstance().rebuildDependencyGraph();
final AbstractBuild<?,?> splitBuild = splitProject.scheduleBuild2(0, new Cause.UserCause()).get();
Jenkins.get().rebuildDependencyGraph();
final AbstractBuild<?,?> splitBuild = splitProject.scheduleBuild2(0, new Cause.UserIdCause()).get();
waitUntilNoActivityUpTo(120*1000);
AbstractBuild<?, ?> intBuild = getUniqueBuild(intProject);
AbstractBuild<?, ?> joinBuild = getUniqueBuild(joinProject);
Expand Down
Loading