Skip to content

Commit 7c68371

Browse files
committed
troubleshoot workflow SSL certificate problem
1 parent 6cf805d commit 7c68371

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scripts/appinspect.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ set -e
1212

1313
command -v jq >/dev/null 2>&1 || (echo >&2 "The program 'jq' is required, please install it on your system"; exit 1)
1414

15+
echo "Get curl version: $(curl --version)"
16+
1517
if [ -z "$SPLUNK_USER" ] || [ -z "$SPLUNK_PASS" ]; then
1618
echo "Required environment variables: SPLUNK_USER, SPLUNK_PASS"
1719
exit 1
@@ -52,7 +54,7 @@ get_token () {
5254
log_info "Authenticating to AppInspect API"
5355
if ! response=$(curl -Ss -X GET \
5456
-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)
5658
then
5759
log_error "Error during token API call: $response"
5860
exit 2
@@ -70,7 +72,7 @@ submit_for_validation () {
7072
-H "Authorization: bearer ${token}" \
7173
-H "Cache-Control: no-cache" \
7274
-F "app_package=@\"${app_path}\"" \
73-
--url "https://appinspect.splunk.com/v1/app/validate")
75+
--url "https://appinspect.splunk.com/v1/app/validate" -k)
7476
then
7577
log_error "Error during submit API call: $response"
7678
exit 2
@@ -86,7 +88,7 @@ check_status () {
8688
log_debug "Checking status"
8789
if ! response=$(curl -Ss -X GET \
8890
-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)
9092
then
9193
log_error "Error during check status API call: $response"
9294
exit 2
@@ -110,7 +112,7 @@ get_report () {
110112
-H "Authorization: bearer ${token}" \
111113
-H "Cache-Control: no-cache" \
112114
-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)
114116
then
115117
log_error "Error during get report API call: $response"
116118
exit 2

0 commit comments

Comments
 (0)