Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stage('Test the 500 log URLs') {
- steps {
- script {
- echo 'Testing the URLs from the 500 error access log...'
- sh '''#!/bin/bash
- while IFS= read -r line; do
- URL=`echo $line | awk '{print $2}' | sed 's/http:/https:/' `
- RESULT=`curl -LI $URL -o /dev/null -w "%{http_code}n" -s | tr -d '[:space:]' `
- if [[ $RESULT != "200" ]]
- then
- echo "$RESULT $URL"
- fi
- done < tests/Smoke/logs_testing/500errors.txt
- '''
- }
- }
- }
- URL=`echo $line | awk '{print $2}' | sed 's/http:/https:/' `
- RESULT=`curl -LI $URL -o /dev/null -w "%{http_code}n" -s | tr -d '[:space:]' `
- line 4: curl: command not found
- $ which curl
- /usr/somelocation/curl # <- just an example
- RESULT=`/usr/somelocation/curl -LI $URL...`
- export PATH=$PATH:/usr/somelocation/
Add Comment
Please, Sign In to add comment