Jenkins login shell
Here is how to start a login shell in Jenkins pipeline it's convenient when variables or other stuff need to be sourced.
stage('login shell') {
steps {
script {
sh """#!/bin/bash -l
echo "*** Login shell ***"
"""
}
}
}