I have the following code:
...
stage('Some stage') {
sh """
#!/bin/bash
CHECK=$(curl -sI https://somegithuburl.com)
echo $CHECK
"""
}
...
And when the Jenkins job is executed it returns:
+ CHECK=
Do you know how can I save the output in a variable in the same way I would do in a Shell script?