2

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.

imPK
  • 764
  • 2
  • 7
  • 30

1 Answers1

1

Can print GitHub repo url into Jenkins Console output by running

sh 'git config --get remote.origin.url'

imPK
  • 764
  • 2
  • 7
  • 30