Jenkins: Don't want to trigger on Git Tag (No Workspace)

I have users who need to trigger jenkins jobs on Github (Enterprise) pushes. So all I have access to are Webhooks, and the Git Service hooks. These hooks push even if the only commit was a tag.

Some users auto-tag their builds if they succeed, this auto-tag causes a new webhook to fire and it triggers their build again.

  • Create base docker centos image with python 2.7.8
  • Configure a remote git in jbpm worbench running in docker
  • how to copy file from my localhost to running container?
  • Enable broadcasts between docker containers
  • Is it possible to set maximum delay timeout for restart policy for a container?
  • Docker vfs as default storage driver for docker 1.10.0
  • Typically we were avoiding this by using the git plugins “exclude user” section and setting a list of service accounts on that list that do the tagging.

    However with the advent of our new ephemeral build farm, we don’t maintain workspaces anymore (we spin nodes up as Docker containers on demand). So this approach no longer works (see:

    My temporary work around is that I run a shell script as the first build step which now does some git-log compares and aborts the build if the service account was the only committer.

    I’m looking for a way to use a git hook to trigger a build that does not even start the build if it was just a tag event.

    This would appear to be an a difficult ask, but I feel like this problem has to be pretty common. Many people must auto-tag Git after a build runs successfully and avoid rebuilding.

  • multiple docker clients on the same machine
  • Elastic Beanstalk Multicontainer Docker with private repository CannotPullContainerError
  • How to use docker to create linux images per user on the same domain
  • How to update docker version in AWS ECS
  • Docker Compose raise an AccessDeniedExpcetion
  • Kubernetes equivalent of env-file in Docker
  • One Solution collect form web for “Jenkins: Don't want to trigger on Git Tag (No Workspace)”

    I know this question is getting old, but I recently had a similar problem with Bitbucket’s webhook to Jenkins that would send out notifications of push changes for tags. I tried configuring the hook not to send those, but it never worked.

    After much trial and error, the only thing that worked for me was to set the “Branch Specifier (blank for ‘any’)” field of the Jenkins Git Plugin to “everything but tags”, using a regex like this one: :^(?!.*(refs\/tags\/)).*.

    I admit that this solution has the major drawback that a job with such a configuration cannot build tags… In my case, the set of jobs that had this configuration wasn’t expected to build tags, so it was an okay solution, but I would have much preferred to remove the notifications.

    Hope this helps.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.