my-aws-command). When AWS command fails, my Jenkins job exits. I tried try catch block. I tried command || true. Nothing seems to be working. How do I handle such situation?
I want to run below statement and get the success and fail output in the var a
def a = sh(script: my-script, returnStdout: true)
Something else is failing, something linked to that command
Try to manually execute what your Jenkins script should do and debug it. Use the same IAM role of Jenkins to catch any permission issue. Check cloudtrail on AWS end to see what Jenkins role is trying to do there and if it is missing anything.
Обсуждают сегодня