Skip to content

Commit 385f434

Browse files
committed
[JENKINS-68480] Automatically select owner for GitHubAppCredentials
upgrade dependency to build
1 parent 7e985db commit 385f434

File tree

3 files changed

+20
-70
lines changed

3 files changed

+20
-70
lines changed

Jenkinsfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
buildPlugin()
1+
buildPlugin(useContainerAgent: true, configurations: [
2+
[platform: 'linux', jdk: 17],
3+
[platform: 'windows', jdk: 11],
4+
])

pom.xml

Lines changed: 15 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.jenkins-ci.plugins</groupId>
77
<artifactId>plugin</artifactId>
8-
<version>3.57</version>
8+
<version>4.57</version>
99
<relativePath />
1010
</parent>
1111

@@ -16,11 +16,7 @@
1616
<properties>
1717
<revision>2.8</revision>
1818
<changelist>999999-SNAPSHOT</changelist>
19-
<jenkins.version>2.164.3</jenkins.version>
20-
<java.level>8</java.level>
21-
<jenkins-test-harness.version>2.39</jenkins-test-harness.version>
22-
<hpi-plugin.version>3.5</hpi-plugin.version>
23-
<stapler-plugin.version>1.17</stapler-plugin.version>
19+
<jenkins.version>2.375.3</jenkins.version>
2420
</properties>
2521

2622
<name>Pipeline: GitHub</name>
@@ -38,7 +34,7 @@
3834
<scm>
3935
<connection>scm:git:https://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
4036
<developerConnection>scm:git:ssh://git@github.com/jenkinsci/${project.artifactId}-plugin.git</developerConnection>
41-
<url>http://github.com/jenkinsci/${project.artifactId}-plugin</url>
37+
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
4238
<tag>${scmTag}</tag>
4339
</scm>
4440

@@ -56,57 +52,30 @@
5652
</pluginRepositories>
5753

5854
<dependencies>
59-
60-
<dependency>
61-
<groupId>org.jenkins-ci.plugins</groupId>
62-
<artifactId>structs</artifactId>
63-
<version>1.14</version>
64-
</dependency>
65-
66-
<dependency>
67-
<groupId>org.jenkins-ci.plugins</groupId>
68-
<artifactId>scm-api</artifactId>
69-
<version>2.2.7</version>
70-
</dependency>
71-
72-
<!-- For Steps -->
73-
<dependency>
74-
<groupId>org.jenkins-ci.plugins.workflow</groupId>
75-
<artifactId>workflow-step-api</artifactId>
76-
<version>2.15</version>
77-
</dependency>
78-
79-
<dependency>
80-
<groupId>org.jenkins-ci.plugins.workflow</groupId>
81-
<artifactId>workflow-cps</artifactId>
82-
<version>2.53</version>
83-
</dependency>
84-
8555
<dependency>
8656
<groupId>org.jenkins-ci.plugins</groupId>
8757
<artifactId>github-branch-source</artifactId>
88-
<version>2.8.2</version>
58+
<version>1703.vd5a_2b_29c6cdc</version>
8959
</dependency>
9060

91-
<!-- to resolve conflict in github-branch-source -->
92-
<dependency>
93-
<groupId>org.apache.commons</groupId>
94-
<artifactId>commons-lang3</artifactId>
95-
<version>3.9</version>
96-
<scope>runtime</scope>
97-
</dependency>
9861

9962
<!-- to resolve conflict in github-branch-source -->
10063
<dependency>
10164
<groupId>org.jenkins-ci.plugins</groupId>
10265
<artifactId>credentials</artifactId>
103-
<version>2.1.16</version>
66+
<version>1224.vc23ca_a_9a_2cb_0</version>
10467
</dependency>
10568

10669
<dependency>
10770
<groupId>org.jenkins-ci.plugins.workflow</groupId>
10871
<artifactId>workflow-job</artifactId>
109-
<version>2.21</version>
72+
<version>1289.vd1c337fd5354</version>
73+
</dependency>
74+
75+
<dependency>
76+
<groupId>org.jenkins-ci.plugins</groupId>
77+
<artifactId>jackson2-api</artifactId>
78+
<version>2.13.3-285.vc03c0256d517</version>
11079
</dependency>
11180

11281
<!-- GitHub Client Dependencies -->
@@ -117,33 +86,11 @@
11786
</dependency>
11887

11988
<dependency>
120-
<groupId>com.google.code.gson</groupId>
121-
<artifactId>gson</artifactId>
122-
<version>2.8.5</version>
123-
</dependency>
124-
125-
<!-- Unit testing Dependencies -->
126-
<dependency>
127-
<groupId>org.jenkins-ci.plugins</groupId>
128-
<artifactId>junit</artifactId>
129-
<version>1.24</version>
130-
<scope>test</scope>
131-
</dependency>
132-
133-
<dependency>
134-
<groupId>org.jenkins-ci.plugins</groupId>
135-
<artifactId>token-macro</artifactId>
136-
<version>2.5</version>
137-
<scope>test</scope>
89+
<groupId>org.jenkins-ci.plugins.workflow</groupId>
90+
<artifactId>workflow-cps</artifactId>
91+
<version>3653.v07ea_433c90b_4</version>
13892
</dependency>
13993

140-
<!--<dependency>-->
141-
<!--<groupId>org.jenkins-ci.plugins.workflow</groupId>-->
142-
<!--<artifactId>workflow-multibranch</artifactId>-->
143-
<!--<version>2.14</version>-->
144-
<!--<scope>test</scope>-->
145-
<!--</dependency>-->
146-
14794
</dependencies>
14895

14996
</project>

src/main/java/org/jenkinsci/plugins/pipeline/github/GitHubHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static ExtendedGitHubClient getGitHubClient(@Nonnull final Job<?,?> job)
6161
// configure credentials
6262
if (gitHubSource.getCredentialsId() != null) {
6363
StandardCredentials credentials = Connector.lookupScanCredentials(
64-
job, gitHubSource.getApiUri(), gitHubSource.getCredentialsId());
64+
job, gitHubSource.getApiUri(), gitHubSource.getCredentialsId(), gitHubSource.getRepoOwner());
6565

6666
if (credentials instanceof StandardUsernamePasswordCredentials) {
6767
StandardUsernamePasswordCredentials c = (StandardUsernamePasswordCredentials) credentials;

0 commit comments

Comments
 (0)