I am calling a script from Jenkins pipeline like so:
stage('Prepare Windows') {
steps {
bat '''echo prepare steps on windows'''
bat '''E:\\compass\\preparation\\windows\\prepare_sources.sh juice E:\\builds\\mapps_builds 0.6.0'''
}
}
It works nicely, but the echo statements executed inside the script do not appear in the Jenkins console e.g
echo "=================================="
echo " Preparing build ${BUILD_NUMBER}"
echo "=================================="
I tried:
bat '''E:\\compass\\preparation\\windows\\prepare_sources.sh juice E:\\builds\\mapps_builds 0.6.0 2>&1'''
I have also tried based on the feedback below:
script {
def prepareWindowsStdout = bat(label: 'Prepare Windows Sources', script: "E:\\compass\\preparation\\windows\\prepare_sources.sh juice E:\\builds\\mapps_builds ${env.TRACK}", returnStdout: true)
print prepareWindowsStdout
}
It compiles and runs, but does not print out any output from the bash script.
Any suggestions would be very helpful.
Thanks