Reputation: 884
Is there anyway that I can get the GitHub organization on which I'm running the Jenkins workflow through the Jenkinsfile.
I can check it through the BUILD_URL
def url = env.BUILD_URL
sh 'echo $BUILD_URL'
But can I print the GitHub repo url or GitHub organization in the console.
Upvotes: 2
Views: 1136
Reputation: 884
Can print GitHub repo url into Jenkins Console output by running
sh 'git config --get remote.origin.url'
Upvotes: 1