Skip to content

Commit

Permalink
Latest dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
exlegalalien committed Sep 19, 2024
1 parent 7ae488d commit 299dac1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
19 changes: 7 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
The not-very-obvious `version` value is found in this table:
https://github.com/jenkinsci/bom?tab=readme-ov-file#depending-on-older-versions
-->
<artifactId>bom-2.387.x</artifactId>
<version>2543.vfb_1a_5fb_9496d</version>
<artifactId>bom-2.452.x</artifactId>
<version>3358.vea_fa_1f41504d</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down Expand Up @@ -42,26 +42,21 @@
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<!-- See https://github.com/jenkinsci/plugin-pom/releases for available versions -->
<version>4.86</version>
<version>4.87</version>
<relativePath />
</parent>
<groupId>io.jenkins.plugins</groupId>
<artifactId>zscan-upload</artifactId>
<version>2.1.0</version>
<version>2.1.1</version>
<packaging>hpi</packaging>
<properties>
<!--
Take a look at the developer documentation for the baseline version to use
https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/#currently-recommended-versions
eg: 2.387.3 is reasonable when you need older LTS version that doesn't
have too many detached plugins.
2.414.3 and 2.426.3 make good core dependencies.
2.440.1 if you need, say, newer features
The 2.xxx.1 are the first release of a given line
The 2.xxx.3 are typically the last releases of a given line
2.387.2 is the oldest LTS currently supported by the Jenkins update center.
At the moment, the Jenkins releases 2.440.3 and 2.452.4 make good core dependencies.
You could also consider 2.462.1 if there are specific reasons, like new features, to want something newer.
-->
<jenkins.version>2.440.3</jenkins.version>
<jenkins.version>2.452.4</jenkins.version>
</properties>
<name>Upload to zScan</name>
<description>This plugin uploads build artifacts to Zimperium zScan for app analysis</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import hudson.tasks.Publisher;
import hudson.tasks.Recorder;
import hudson.util.FormValidation;
import hudson.util.Secret;
import jenkins.tasks.SimpleBuildStep;
import net.sf.json.JSONObject;
import okhttp3.*;
Expand Down Expand Up @@ -69,7 +70,7 @@ public class ZDevUploadPlugin extends Recorder implements SimpleBuildStep{
public String excludedFile;
public String endpoint;
public String clientId;
public String clientSecret;
public Secret clientSecret;

// optional
private Boolean waitForReport;
Expand All @@ -78,7 +79,7 @@ public class ZDevUploadPlugin extends Recorder implements SimpleBuildStep{
private String teamName;

@DataBoundConstructor
public ZDevUploadPlugin(String sourceFile, String excludedFile, String endpoint, String clientId, String clientSecret) {
public ZDevUploadPlugin(String sourceFile, String excludedFile, String endpoint, String clientId, Secret clientSecret) {
this.sourceFile = sourceFile;
this.excludedFile = excludedFile;
this.endpoint = endpoint;
Expand Down Expand Up @@ -173,7 +174,7 @@ public void perform(Run<?, ?> run, FilePath workspace, Launcher launcher, TaskLi
}

// Login and obtain a token
Call<LoginResponse> loginResponseCall = service.login(new LoginCredentials(this.clientId, this.clientSecret));
Call<LoginResponse> loginResponseCall = service.login(new LoginCredentials(this.clientId, Secret.toString(this.clientSecret)));
Response<LoginResponse> response = loginResponseCall.execute();

if (!response.isSuccessful() || response.body() == null) {
Expand Down Expand Up @@ -343,7 +344,7 @@ public void perform(Run<?, ?> run, FilePath workspace, Launcher launcher, TaskLi
if(scanStatus.equals("Done")) {
assessmentId = statusObject.get("id").getAsString();
// need to pause before continuing to make sure reports are available
log(console, "Waiting for the report to become available.");
log(console, "Waiting for the report to become available...");
wait(checkInterval * 1000);
break;
}
Expand Down

0 comments on commit 299dac1

Please sign in to comment.