I have a requirement where depending on the interest of the developer, He might want to choose to build from master branch or Tag.
I was able to build from tags using the Git parameter plugin. From the git parameter plugin, when I choose Tags or branch, I can see my tags and branches. But When I select a branch to build from, I get the following git error.
+refs/tags/:refs/remotes/origin/tags/ +refs/heads/master:refs/remotes/origin/master 00:00:02.508 > git rev-parse refs/remotes/origin/tags/origin/master^{commit} # timeout=10 00:00:02.549 > git rev-parse refs/remotes/origin/origin/tags/origin/master^{commit} # timeout=10 00:00:02.590 > git rev-parse origin/tags/origin/master^{commit} # timeout=10
Can someone please help me to achieve the above requirement in one Jenkins Job?