Skip to content

Commit

Permalink
Merge branch 'release/1.x' into cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sghill authored Aug 16, 2023
2 parents 769114c + 44a2970 commit 525a51d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<extension>
<groupId>io.jenkins.tools.incrementals</groupId>
<artifactId>git-changelist-maven-extension</artifactId>
<version>1.3</version>
<version>1.7</version>
</extension>
</extensions>
6 changes: 5 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
buildPlugin()
buildPlugin(useContainerAgent: true, configurations: [
[ platform: 'linux', jdk: '11' ],
[ platform: 'windows', jdk: '11' ],
[ platform: 'linux', jdk: '17' ],
])
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.40</version>
<version>4.51</version>
<relativePath />
</parent>
<packaging>hpi</packaging>
<properties>
<revision>1.29</revision>
<changelist>-SNAPSHOT</changelist>
<!-- Baseline Jenkins version you use to build the plugin. Users must have this version or newer to run. -->
<jenkins.version>2.303.1</jenkins.version>
<jenkins.version>2.346.3</jenkins.version>
<hpi.compatibleSinceVersion>1.9</hpi.compatibleSinceVersion>
</properties>
<artifactId>stashNotifier</artifactId>
Expand Down Expand Up @@ -80,8 +80,8 @@
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.303.x</artifactId>
<version>1382.v7d694476f340</version>
<artifactId>bom-2.346.x</artifactId>
<version>1763.v092b_8980a_f5e</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down
1 change: 0 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Requirements
============

* **[Stash][] 2.1** or newer / **[Bitbucket Server][] 4.0** or newer
* **Jenkins 2.60.3** or newer

This plugin uses the Atlassian Stash / Bitbucket Server [Build REST API][].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,11 @@ HttpPost createRequest(
final JSONObject payload,
final Credentials credentials,
@NonNull NotificationContext context) throws AuthenticationException {
PrintStream logger = context.getLogger();
HttpPost req = new HttpPost(uri.toString());

if (credentials != null) {
if (credentials instanceof UsernamePasswordCredentials) {
logger.println("createRequest - UsernamePasswordCredentials");
LOGGER.debug("createRequest - UsernamePasswordCredentials");
req.addHeader(new BasicScheme().authenticate(
new org.apache.http.auth.UsernamePasswordCredentials(
((UsernamePasswordCredentials)credentials).getUsername(),
Expand All @@ -89,7 +88,7 @@ HttpPost createRequest(
null));
}
else if (credentials instanceof StringCredentials) {
logger.println("createRequest - StringCredentials/secret text");
LOGGER.debug("createRequest - StringCredentials/secret text");
req.addHeader(HttpHeaders.AUTHORIZATION, "Bearer " + ((StringCredentials)credentials).getSecret().getPlainText());
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ HttpNotifierSelector providesHttpNotifierSelector(@StashNotifierDefault HttpNoti
.orElse(fallback);
Class<? extends HttpNotifierSelector> selectedClass = selector.getClass();
if (selectedClass.getName().equals(preferredHttpNotifierSelector)) {
LOGGER.info("Using {}", selectedClass.getName());
LOGGER.debug("Using {}", selectedClass.getName());
} else {
LOGGER.warn("{} not found - using {}", preferredHttpNotifierSelector, selectedClass.getName());
}
Expand Down

0 comments on commit 525a51d

Please sign in to comment.