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, 2019 in DevOps Tools by Arvind
• 3,050 points
18,454 views

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 25, 2019 by Neel
• 3,020 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, 2019 by Sirajul
• 59,230 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, 2019 in DevOps Tools by Kalgi
• 52,350 points
880 views
0 votes
3 answers
0 votes
1 answer
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,034 views
+2 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP