Skip to content

Commit ae75d61

Browse files
committed
Add ignoreCertErrors option
1 parent 510eda3 commit ae75d61

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ task downloadFeatures(type: FeaturesTask){
4747
proxyPassword = "password"
4848
/*Optional - prepend ordinal to feature name (default is true)*/
4949
numbered = false
50+
/*Optional - Ignore ssl certificate errors for self-signed certificates (default is false)*/
51+
ignoreCertErrors = true
5052
5153
}
5254
@@ -77,6 +79,8 @@ task submitReport(type: ReportTask){
7779
metadata="""{"env ":"uat ","build":"456"}"""
7880
/*-Optional - all Jira tickets will be updated with test results by default; when JQL is provided only filtered tickets will be updated*/
7981
jql = "project = XX AND key in ('XXX-1')"
82+
/*Optional - Ignore ssl certificate errors for self-signed certificates (default is false)*/
83+
ignoreCertErrors = true
8084
}
8185
8286
```

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repositories {
1717
dependencies {
1818
implementation gradleApi()
1919
implementation localGroovy()
20-
compile group: 'com.assertthat.plugins', name: 'assertthat-bdd-standalone', version: '1.9.3'
20+
compile group: 'com.assertthat.plugins', name: 'assertthat-bdd-standalone', version: '1.9.5'
2121
}
2222

2323
task javadocJar(type: Jar) {

src/main/groovy/FeaturesTask.groovy

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ class FeaturesTask extends DefaultTask {
6565
@Input
6666
@Optional
6767
Boolean numbered = true
68+
@Input
69+
@Optional
70+
Boolean ignoreCertErrors = false
6871

6972
@TaskAction
7073
def downloadFeatures() {
@@ -83,8 +86,16 @@ class FeaturesTask extends DefaultTask {
8386
tags,
8487
null,
8588
jiraServerUrl,
86-
numbered)
87-
APIUtil apiUtil = new APIUtil(arguments.getProjectId(), arguments.getAccessKey(), arguments.getSecretKey(), arguments.getProxyURI(), arguments.getProxyUsername(), arguments.getProxyPassword(), arguments.getJiraServerUrl())
89+
numbered,
90+
ignoreCertErrors)
91+
APIUtil apiUtil = new APIUtil(arguments.getProjectId(),
92+
arguments.getAccessKey(),
93+
arguments.getSecretKey(),
94+
arguments.getProxyURI(),
95+
arguments.getProxyUsername(),
96+
arguments.getProxyPassword(),
97+
arguments.getJiraServerUrl(),
98+
arguments.isIgnoreCertErrors())
8899
File inZip = apiUtil.download(new File(arguments.getOutputFolder()),
89100
mode, jql, tags, arguments.isNumbered())
90101
File zip = new FileUtil().unpackArchive(inZip, new File(arguments.getOutputFolder()))

src/main/groovy/ReportTask.groovy

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ class ReportTask extends DefaultTask {
7070
@Input
7171
@Optional
7272
String jql = null
73+
@Input
74+
@Optional
75+
Boolean ignoreCertErrors = false
7376

7477
@TaskAction
7578
def submitReport() {
@@ -88,8 +91,16 @@ class ReportTask extends DefaultTask {
8891
type,
8992
jiraServerUrl,
9093
metadata,
91-
true)
92-
APIUtil apiUtil = new APIUtil(arguments.getProjectId(), arguments.getAccessKey(), arguments.getSecretKey(), arguments.getProxyURI(), arguments.getProxyUsername(), arguments.getProxyPassword(), arguments.getJiraServerUrl())
94+
true,
95+
ignoreCertErrors)
96+
APIUtil apiUtil = new APIUtil(arguments.getProjectId(),
97+
arguments.getAccessKey(),
98+
arguments.getSecretKey(),
99+
arguments.getProxyURI(),
100+
arguments.getProxyUsername(),
101+
arguments.getProxyPassword(),
102+
arguments.getJiraServerUrl(),
103+
arguments.isIgnoreCertErrors())
93104

94105
String[] files = new FileUtil().findJsonFiles(new File(arguments.getJsonReportFolder()), arguments.getJsonReportIncludePattern(), null)
95106
Long runid = -1L

0 commit comments

Comments
 (0)