Hi list,
we are currently using jenkins to do some deployment tasks. It works great
except for one little problem:
We are using the git plugin to fetch our repo. As we sometimes want to
deploy a tag and sometimes a branch we added 2 parameters to the build.
- One GIT_TAG which uses the Git Tag Parameter from the Git Plugin
- Another GIT_BRANCH Parameter as a string
What we actually want is: If no GIT_TAG is chosen when running the
parameterized build, use the GIT_BRANCH specified. If a GIT_TAG is picked,
use the TAG for the build.
Currently i execute this in the shell before doing my deployment:
cd "${WORKSPACE}"
if [ -z "${GIT_TAG}" ] ; then
git checkout ${GIT_BRANCH}
git pull origin ${GIT_BRANCH}
else
git checkout refs/tags/${GIT_TAG}
fi
sometimes this confuses the git plugin though and i also cannot see the
changes for this build in the jenkins interface.
Is there a better way to fulfill our requirements?
Regards and thanks in advance
Sebastian
--
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/cf10cded-29da-4ed4-a455-c95ea8ce39b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.