The below is my Jenkins Pipeline stage
stage ('Import') {
steps {
sshagent([sshCredentials]) {
sh '''
#!/bin/bash
sh -x ETL_AUTOMATION/Scripts/export.sh
'''
Build output:-
[[ RMO_TST12 == ]]
ETL_AUTOMATION/Scripts/export.sh: 17: ETL_AUTOMATION/Scripts/export.sh: [[: not found
if
condition in script:-
if [[ "$SOURCE_FOLDER" == "" ]]; then
echo "SOURCE_FOLDER not specified... exiting"
exit 1
fi
I have mentioned #!/bin/bash
in my script also.
Please help me, I am really stuck here.