Skip to content

Commit 8fe4be4

Browse files
authored
Merge pull request #742 from MarkEWaite/make-sure-git-is-always-modern
Fix JENKINS-58964 - Lost modern SCM with older workflow cps global lib
2 parents bc00f6f + 05f8278 commit 8fe4be4

File tree

2 files changed

+58
-11
lines changed

2 files changed

+58
-11
lines changed

pom.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
<inceptionYear>2007</inceptionYear>
2525

2626
<properties>
27-
<revision>3.11.1</revision>
27+
<revision>3.12.0</revision>
2828
<changelist>-SNAPSHOT</changelist>
29-
<jenkins.version>2.121.1</jenkins.version>
29+
<jenkins.version>2.138.4</jenkins.version>
3030
<java.level>8</java.level>
3131
<no-test-jar>false</no-test-jar>
3232
<useBeta>true</useBeta>
@@ -92,7 +92,7 @@
9292
<dependency>
9393
<groupId>org.jenkins-ci.plugins</groupId>
9494
<artifactId>structs</artifactId>
95-
<version>1.18</version>
95+
<version>1.19</version>
9696
</dependency>
9797
<dependency>
9898
<groupId>org.jenkins-ci.plugins</groupId>
@@ -102,7 +102,7 @@
102102
<dependency>
103103
<groupId>org.jenkins-ci.plugins</groupId>
104104
<artifactId>credentials</artifactId>
105-
<version>2.1.14</version>
105+
<version>2.1.18</version>
106106
</dependency>
107107
<dependency>
108108
<groupId>org.jenkins-ci.plugins</groupId>
@@ -123,12 +123,12 @@
123123
<dependency>
124124
<groupId>org.jenkins-ci.plugins.workflow</groupId>
125125
<artifactId>workflow-step-api</artifactId>
126-
<version>2.13</version>
126+
<version>2.20</version>
127127
</dependency>
128128
<dependency>
129129
<groupId>org.jenkins-ci.plugins.workflow</groupId>
130130
<artifactId>workflow-scm-step</artifactId>
131-
<version>2.4</version>
131+
<version>2.7</version>
132132
</dependency>
133133
<dependency>
134134
<groupId>org.jenkins-ci.plugins</groupId>
@@ -212,7 +212,7 @@
212212
<dependency>
213213
<groupId>org.jenkins-ci.plugins.workflow</groupId>
214214
<artifactId>workflow-step-api</artifactId>
215-
<version>2.13</version>
215+
<version>2.20</version>
216216
<classifier>tests</classifier>
217217
<scope>test</scope>
218218
</dependency>
@@ -226,7 +226,7 @@
226226
<dependency>
227227
<groupId>org.jenkins-ci.plugins.workflow</groupId>
228228
<artifactId>workflow-cps</artifactId>
229-
<version>2.52</version>
229+
<version>2.71</version>
230230
<scope>test</scope>
231231
</dependency>
232232
<dependency>
@@ -256,7 +256,7 @@
256256
<dependency>
257257
<groupId>org.jenkins-ci.plugins.workflow</groupId>
258258
<artifactId>workflow-cps-global-lib</artifactId>
259-
<version>2.10</version>
259+
<version>2.14</version>
260260
<scope>test</scope>
261261
<exclusions>
262262
<exclusion>
@@ -274,13 +274,13 @@
274274
<dependency>
275275
<groupId>org.jenkins-ci.plugins.workflow</groupId>
276276
<artifactId>workflow-api</artifactId>
277-
<version>2.30</version>
277+
<version>2.33</version>
278278
<scope>test</scope>
279279
</dependency>
280280
<dependency>
281281
<groupId>org.jenkins-ci.plugins.workflow</groupId>
282282
<artifactId>workflow-support</artifactId>
283-
<version>3.1</version>
283+
<version>3.3</version>
284284
<scope>test</scope>
285285
</dependency>
286286
<!-- JCasC compatibility -->
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
*
3+
* The MIT License
4+
*
5+
* Copyright (c) Red Hat, Inc.
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in
15+
* all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
* THE SOFTWARE.
24+
*/
25+
package jenkins.plugins.git;
26+
27+
import hudson.ExtensionList;
28+
import org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever;
29+
import org.junit.Rule;
30+
import org.junit.Test;
31+
import org.jvnet.hudson.test.JenkinsRule;
32+
33+
import static org.hamcrest.Matchers.contains;
34+
import static org.hamcrest.Matchers.instanceOf;
35+
import static org.junit.Assert.assertThat;
36+
37+
public class ModernScmTest {
38+
39+
@Rule
40+
public JenkinsRule jenkins = new JenkinsRule();
41+
42+
@Test
43+
public void gitIsModernScm() {
44+
SCMSourceRetriever.DescriptorImpl descriptor = ExtensionList.lookupSingleton(SCMSourceRetriever.DescriptorImpl.class);
45+
assertThat(descriptor.getSCMDescriptors(), contains(instanceOf(GitSCMSource.DescriptorImpl.class)));
46+
}
47+
}

0 commit comments

Comments
 (0)