Brilliant! That worked. I'm onto the next error now, but the pipeline script appears to be doing what I want it to :) For reference, the finished JEnkinsfile looks like this:
def git_url = "[email protected]:myorg/my_project.git"" def git_branch node { stage "Check out from git" checkout scm stage "Make sure our git branch var is accessible" sh 'git rev-parse --abbrev-ref HEAD > GIT_BRANCH' git_branch = readFile('GIT_BRANCH').trim() echo git_branch stage 'Use build_tool to build the branch' sh "sudo -Hs build_tool dist ${git_url} my_project ${git_branch}" } Thanks very much :) --- >>> >>> Jerry Steele >>> Telephone: +44 (0)7492 910225 >>> http://www.ticktockhouse.co.uk >>> GPG: 43A3A8C6 >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-users/ae4572c3-1aa5-47c6-91b7-c29fe7ee5ee0%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-users/ae4572c3-1aa5-47c6-91b7-c29fe7ee5ee0%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a5995359-8083-492f-b4eb-5f90e0c602be%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
