Skip to content

Commit ec0f0f7

Browse files
authored
Merge pull request #2 from jenkinsci/master
Pull request to match official release
2 parents ca14c2f + ca27c3b commit ec0f0f7

File tree

4 files changed

+28
-9
lines changed

4 files changed

+28
-9
lines changed

Readme.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
##Project Description
66
Configuring IBM Security AppScan Source scans in Jenkins can be time-consuming and error-prone when custom batch or shell scripts are used. This Jenkins plugin greatly simplifies the running of AppScan Source from Jenkins by providing centralized global settings and straight-forward input fields for scan configuration.
77

8+
Additional information about the plugin can be found here: https://wiki.jenkins-ci.org/display/JENKINS/IBM+AppScan+Source+Scanner+Plugin
9+
810
##This plugin requires (Prerequisites):
911

1012
1. AppScan Source installed on the Jenkins Server
@@ -16,7 +18,7 @@ Configuring IBM Security AppScan Source scans in Jenkins can be time-consuming a
1618
To generate an AppScan Source login token, execute the AppScan Source CLI, then log in with the following parameters:
1719
`AppScan Enterprise Server URL, AppScan Source username, AppScan Source password -persist [-acceptssl]`
1820

19-
ex. `AppScanSrcCli.exe http://localhost:9443/asc myHostname\administrator appScanSourcePassword! -persist -acceptssl`
21+
ex. `AppScanSrcCli.exe login http://localhost:9443/asc myHostname\administrator appScanSourcePassword! -persist -acceptssl`
2022

2123
This will generate a file named ouncecli.token in the home directory of the user who executes the command.
2224

@@ -25,13 +27,17 @@ http://www-01.ibm.com/support/knowledgecenter/SSS9LM_9.0.1/com.ibm.rational.apps
2527

2628
##Plugin Use:
2729
###Install plugin
30+
####Automatically
31+
The plugin is available to install from within the Jenkins Update Center, which is accessible through the Manage Jenkins menu of your Jenkins installation. If the plugin is not listed as an available plugin, please update your Jenkins installation.
2832

33+
####Manually
2934
1. From the Jenkins main page, select Manage Jenkins
3035
2. Select Manage Plugins
3136
3. Click "Advanced"
3237
4. Under Upload Plugin, choose the HPI file to upload (located in this project's "release" directory), then click "Upload"
3338
5. Restart Jenkins
3439

40+
3541
###Configure Plugin
3642

3743
1. From the Jenkins main page, select Manage Jenkins

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</parent>
1212
<groupId>com.aspectsecurity.automationservices.plugins.jenkins</groupId>
1313
<artifactId>ibm-security-appscansource-scanner</artifactId>
14-
<version>1.0.1-SNAPSHOT</version>
14+
<version>1.0.4-SNAPSHOT</version>
1515
<packaging>hpi</packaging>
1616

1717
<name>IBM Security AppScan Source Scanner</name>
Binary file not shown.

src/main/java/com/aspectsecurity/automationservices/plugins/jenkins/appscansource/AppScanSourceBuilder.java

+20-7
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,29 @@ public static boolean checkApplicationFileName(String filePath){
181181
return false;
182182
}
183183

184-
public static boolean checkApplicationFileNameExists(String filePath){
185-
return new File(filePath).exists();
184+
public boolean checkApplicationFileNameExists(String filePath) {
185+
try {
186+
return new FilePath(new File(filePath)).exists();
187+
} catch (IOException e) {
188+
logger.println(filePath + " could not be found. Cannot continue.");
189+
} catch (InterruptedException e) {
190+
logger.println("AppScan Source plugin thread interrupted.");
191+
}
192+
return false;
186193
}
187194

188195
public boolean checkScanWorkspace(String jobScanWorkspace){
189-
File path = new File(jobScanWorkspace);
190-
if(!path.exists()){
191-
logger.println("Scan Workspace does not exist.");
192-
logger.println(path.getAbsolutePath());
193-
return false;
196+
FilePath path = new FilePath(new File(jobScanWorkspace));
197+
try {
198+
if(!path.exists()){
199+
logger.println("Scan Workspace does not exist.");
200+
logger.println(path.getRemote());
201+
return false;
202+
}
203+
} catch (IOException e) {
204+
logger.println(jobScanWorkspace + " could not be found. Cannot continue.");
205+
} catch (InterruptedException e) {
206+
logger.println("AppScan Source plugin thread interrupted.");
194207
}
195208
return true;
196209
}

0 commit comments

Comments
 (0)