12
12
13
13
command -v jq > /dev/null 2>&1 || (echo >&2 " The program 'jq' is required, please install it on your system" ; exit 1)
14
14
15
+ echo " Get curl version: $( curl --version) "
16
+
15
17
if [ -z " $SPLUNK_USER " ] || [ -z " $SPLUNK_PASS " ]; then
16
18
echo " Required environment variables: SPLUNK_USER, SPLUNK_PASS"
17
19
exit 1
@@ -52,7 +54,7 @@ get_token () {
52
54
log_info " Authenticating to AppInspect API"
53
55
if ! response=$( curl -Ss -X GET \
54
56
-u " $SPLUNK_USER :$SPLUNK_PASS " \
55
- --url " https://api.splunk.com/2.0/rest/login/splunk" )
57
+ --url " https://api.splunk.com/2.0/rest/login/splunk" -k )
56
58
then
57
59
log_error " Error during token API call: $response "
58
60
exit 2
@@ -70,7 +72,7 @@ submit_for_validation () {
70
72
-H " Authorization: bearer ${token} " \
71
73
-H " Cache-Control: no-cache" \
72
74
-F " app_package=@\" ${app_path} \" " \
73
- --url " https://appinspect.splunk.com/v1/app/validate" )
75
+ --url " https://appinspect.splunk.com/v1/app/validate" -k )
74
76
then
75
77
log_error " Error during submit API call: $response "
76
78
exit 2
@@ -86,7 +88,7 @@ check_status () {
86
88
log_debug " Checking status"
87
89
if ! response=$( curl -Ss -X GET \
88
90
-H " Authorization: bearer ${token} " \
89
- --url " https://appinspect.splunk.com/v1/app/validate/status/${request_id} " )
91
+ --url " https://appinspect.splunk.com/v1/app/validate/status/${request_id} " -k )
90
92
then
91
93
log_error " Error during check status API call: $response "
92
94
exit 2
@@ -110,7 +112,7 @@ get_report () {
110
112
-H " Authorization: bearer ${token} " \
111
113
-H " Cache-Control: no-cache" \
112
114
-H " Content-Type: ${contenttype} " \
113
- --url " https://appinspect.splunk.com/v1/app/report/${request_id} " )
115
+ --url " https://appinspect.splunk.com/v1/app/report/${request_id} " -k )
114
116
then
115
117
log_error " Error during get report API call: $response "
116
118
exit 2
0 commit comments