Can Jenkins detect and build new tags from Git repository?

0 votes
Is it possible for Jenkins to detect and build new tags from Github repository? This should automatically be done as soon as new tags are created. Is this possible?
Jun 24 in DevOps Tools by Arvind
• 2,960 points

2 answers to this question.

+1 vote
Yes, this can be done in 3 steps as follows:

1. Click on the advanced tab below the line where you specify your repository URL. Here enter the Refspec +refs/tags/*:refs/remotes/origin/tags/*

2. Now use build all tag "branches" with the Branch Specifier */tags/*

3. Now enable SCM polling so that your jenkins job is able to detect new tags that are created.

I think this should solve your problem.
answered Jun 24 by Neel
• 3,010 points
0 votes

If you want to configure a job just to build tags, do the following:

Configure Bitbucket Server: 

Make sure  Advanced Configuration > Branch Options > Build All is selected. This will skip the whitelist and blacklist checks so that all new commits and tags send the required Jenkins notification.

Set up a Jenkins Job for Tags:

In the job set refspec to +refs/tags/*:refs/remotes/origin/tags/*. Set the branch specifier to **/tags/**. This will configure the job so it only responds to new tags.

answered Aug 5 by Sirajul
• 38,900 points

Related Questions In DevOps Tools

+1 vote
1 answer

i have a pyhton code in my git/git repository how to build that code in jenkins

Follow these steps @Bhaskar: Step 1: Open the Jenkins ...READ MORE

answered Oct 14 in DevOps Tools by Kalgi
• 42,510 points
0 votes
3 answers
0 votes
2 answers
0 votes
1 answer

Deploy in to jboss EAP 6.4 from jenkins

You can use the mavan plugin <plugin> <groupId></groupId> <artifactId>jboss-as-maven-plugin</artifactId> <version>7.9.Final</version> <configuration> ...READ MORE

answered Jul 20, 2018 in DevOps Tools by Kalgi
• 42,510 points
+4 votes
2 answers

Jenkins not showing Maven Release Plugin

Make your project type Maven Project. This ...READ MORE

answered Oct 11, 2018 in DevOps Tools by Hannah
• 16,650 points
+4 votes
4 answers

perform Git checkout using Groovy script

To do git commit: def getGitCommit() { ...READ MORE

answered Dec 6, 2018 in DevOps Tools by Vaidya
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
0 votes
1 answer