Skip to content

Commit

Permalink
Merge branch 'master' into 2.164.x-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Aug 28, 2019
2 parents 63ef0d4 + 645c294 commit 1947079
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 49 deletions.
20 changes: 1 addition & 19 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,6 @@ version: 1
update_configs:
- package_manager: java:maven
directory: /
update_schedule: weekly
default_reviewers:
- jglick
- package_manager: java:maven
directory: /
target_branch: 2.164.x
update_schedule: monthly
default_reviewers:
- jglick
- package_manager: java:maven
directory: /
target_branch: 2.150.x
update_schedule: monthly
default_reviewers:
- jglick
- package_manager: java:maven
directory: /
target_branch: 2.138.x
update_schedule: monthly
update_schedule: daily
default_reviewers:
- jglick
2 changes: 2 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
def buildNumber = BUILD_NUMBER as int; if (buildNumber > 1) milestone(buildNumber - 1); milestone(buildNumber) // JENKINS-43353 / JENKINS-58625

def mavenEnv(body) {
node('maven') { // no Dockerized tests; https://github.com/jenkins-infra/documentation/blob/master/ci.adoc#container-agents
sh 'mvn -version'
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,17 @@ Make sure it is used (perhaps transitively) in `sample-plugin/pom.xml`.
Ideally also update the sample plugin’s tests to actually exercise it,
as a sanity check.

Avoid adding transitive dependencies to `sample-plugin/pom.xml`. It is supposed
to look as much as possible like a real plugin, and a real plugin should only
declare its direct dependencies and not its transitive dependencies.

You can also add a `<classifier>tests</classifier>` entry,
for a plugin which specifies `<no-test-jar>false</no-test-jar>`.
You should introduce a POM property so that the version is not repeated.

The build will enforce that all transitive plugin dependencies are also managed.
If the build fails due to an unmanaged transitive plugin dependency, add it to
`bom/pom.xml`.

## PCT

Expand Down
62 changes: 51 additions & 11 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<artifactId>bom</artifactId>
<packaging>pom</packaging>
<properties>
<git-plugin.version>3.11.0</git-plugin.version>
<git-plugin.version>3.12.0</git-plugin.version>
<scm-api-plugin.version>2.6.3</scm-api-plugin.version>
<structs-plugin.version>1.19</structs-plugin.version>
<workflow-api-plugin.version>2.35</workflow-api-plugin.version>
<workflow-cps-plugin.version>2.72</workflow-cps-plugin.version>
<structs-plugin.version>1.20</structs-plugin.version>
<workflow-api-plugin.version>2.36</workflow-api-plugin.version>
<workflow-cps-plugin.version>2.73</workflow-cps-plugin.version>
<workflow-step-api-plugin.version>2.20</workflow-step-api-plugin.version>
<workflow-support-plugin.version>3.3</workflow-support-plugin.version>
</properties>
Expand Down Expand Up @@ -47,6 +47,11 @@
<classifier>tests</classifier>
<version>${workflow-cps-plugin.version}</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-cps-global-lib</artifactId>
<version>2.15</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-durable-task-step</artifactId>
Expand All @@ -55,7 +60,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-job</artifactId>
<version>2.33</version>
<version>2.34</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
Expand Down Expand Up @@ -84,11 +89,21 @@
<classifier>tests</classifier>
<version>${workflow-support-plugin.version}</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>ansicolor</artifactId>
<version>0.6.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>apache-httpcomponents-client-4-api</artifactId>
<version>4.5.5-3.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>branch-api</artifactId>
<version>2.5.4</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>cloudbees-folder</artifactId>
Expand All @@ -102,17 +117,17 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>credentials</artifactId>
<version>2.2.0</version>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>credentials-binding</artifactId>
<version>1.19</version>
<version>1.20</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>display-url-api</artifactId>
<version>2.3.1</version>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand All @@ -133,13 +148,23 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>git-client</artifactId>
<version>2.8.0</version>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>git-server</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jdk-tool</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jquery</artifactId>
<version>1.12.4-1</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jsch</artifactId>
Expand All @@ -150,10 +175,15 @@
<artifactId>junit</artifactId>
<version>1.28</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit-attachments</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>mailer</artifactId>
<version>1.23</version>
<version>1.24</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand All @@ -179,7 +209,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
<version>1.61</version>
<version>1.62</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand All @@ -196,6 +226,16 @@
<artifactId>structs</artifactId>
<version>${structs-plugin.version}</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>timestamper</artifactId>
<version>1.10</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>token-macro</artifactId>
<version>2.8</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>variant</artifactId>
Expand Down
8 changes: 6 additions & 2 deletions pct.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ fi

# TODO rather than removing all these, have a text file of known failures and just convert them to “skipped”

# TODO https://github.com/jenkinsci/structs-plugin/pull/50
rm -fv pct-work/structs-plugin/plugin/target/surefire-reports/TEST-org.jenkinsci.plugins.structs.describable.DescribableModelTest.xml
# TODO https://github.com/jenkinsci/jenkins/pull/4120 problems with workflow-cps → jquery-detached:
rm -fv pct-work/structs-plugin/plugin/target/surefire-reports/TEST-InjectedTest.xml
rm -fv pct-work/apache-httpcomponents-client-4-api/target/surefire-reports/TEST-InjectedTest.xml
rm -fv pct-work/ssh-slaves/target/surefire-reports/TEST-InjectedTest.xml
rm -fv pct-work/plain-credentials/target/surefire-reports/TEST-InjectedTest.xml
# TODO pending https://github.com/jenkinsci/ansicolor-plugin/pull/164
rm -fv pct-work/ansicolor/target/surefire-reports/TEST-hudson.plugins.ansicolor.AnsiColorBuildWrapperTest.xml
# TODO https://github.com/jenkinsci/matrix-project-plugin/pull/59
rm -fv pct-work/matrix-project/target/surefire-reports/TEST-InjectedTest.xml
# TODO https://github.com/jenkinsci/jenkins/pull/4099 pending backport to 2.176.3
Expand All @@ -55,5 +55,9 @@ rm -fv pct-work/durable-task/target/surefire-reports/TEST-org.jenkinsci.plugins.
rm -fv pct-work/git-client/target/surefire-reports/TEST-hudson.plugins.git.GitExceptionTest.xml
# TODO fails for one reason in (non-PCT) official sources, run locally; and for another reason in PCT in Docker; passes in official sources in Docker, or locally in PCT
rm -fv pct-work/git-client/target/surefire-reports/TEST-org.jenkinsci.plugins.gitclient.FilePermissionsTest.xml
# TODO pending https://github.com/jenkinsci/workflow-api-plugin/pull/99
rm -fv pct-work/workflow-api/target/surefire-reports/TEST-org.jenkinsci.plugins.workflow.log.FileLogStorageTest.xml
# TODO pending https://github.com/jenkinsci/workflow-durable-task-step-plugin/pull/117
rm -fv pct-work/workflow-cps-global-lib/target/surefire-reports/TEST-org.jenkinsci.plugins.workflow.libs.LibraryMemoryTest.xml

# produces: pct-report.xml, **/target/surefire-reports/TEST-*.xml
14 changes: 0 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,6 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>skip-tests-on-release</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<properties>
<skipTests>true</skipTests>
</properties>
</profile>
</profiles>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
Expand Down
2 changes: 1 addition & 1 deletion prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cp -rv test-classes/test-dependencies/*.hpi megawar/WEB-INF/plugins
# TODO find a way to encode this in some POM so that it can be managed by Dependabot
version=0.1.0
pct=$HOME/.m2/repository/org/jenkins-ci/tests/plugins-compat-tester-cli/$version/plugins-compat-tester-cli-$version.jar
[ -f $pct ] || $MVN dependency:get -Dartifact=org.jenkins-ci.tests:plugins-compat-tester-cli:$version:jar -Dtransitive=false
[ -f $pct ] || $MVN dependency:get -Dartifact=org.jenkins-ci.tests:plugins-compat-tester-cli:$version:jar -DremoteRepositories=https://repo.jenkins-ci.org/public/ -Dtransitive=false

cp $pct pct.jar
cd megawar/WEB-INF/plugins
Expand Down
65 changes: 63 additions & 2 deletions sample-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>3.47</version>
<version>3.49</version>
<relativePath />
</parent>
<groupId>io.jenkins.tools.bom</groupId>
Expand All @@ -17,6 +17,18 @@
<jenkins.version>2.164.3</jenkins.version>
<java.level>8</java.level>
</properties>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
<dependencyManagement>
<dependencies>
<dependency>
Expand Down Expand Up @@ -49,6 +61,11 @@
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-cps-global-lib</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-durable-task-step</artifactId>
Expand All @@ -71,6 +88,11 @@
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>branch-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>matrix-project</artifactId>
Expand All @@ -91,6 +113,11 @@
<artifactId>jdk-tool</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>ansicolor</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>cloudbees-folder</artifactId>
Expand All @@ -112,6 +139,26 @@
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit-attachments</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>timestamper</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>token-macro</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>variant</artifactId>
Expand All @@ -123,7 +170,7 @@
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<version>2.1</version>
<version>2.1.1</version>
<executions>
<execution>
<phase>generate-test-sources</phase>
Expand Down Expand Up @@ -152,4 +199,18 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>skip-tests-on-release</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<properties>
<skipTests>true</skipTests>
</properties>
</profile>
</profiles>
</project>

0 comments on commit 1947079

Please sign in to comment.