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
• 2,980 points
1,621 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 24, 2019 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, 2019 by Sirajul
• 53,110 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
• 51,850 points
87 views
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>org.jboss.as.plugins</groupId> <artifactId>jboss-as-maven-plugin</artifactId> <version>7.9.Final</version> <configuration> ...READ MORE

answered Jul 20, 2018 in DevOps Tools by Kalgi
• 51,850 points
926 views
0 votes
1 answer

How to get the current status of a local repository in Git?

Using 'git status' command in the repository ...READ MORE

answered Nov 26, 2019 in DevOps Tools by Sirajul
• 53,110 points
49 views
0 votes
1 answer

What are the steps to permanently remove a committed file from the repository?

To remove a file for example 'myfile.txt'; ...READ MORE

answered Nov 26, 2019 in DevOps Tools by Sirajul
• 53,110 points
54 views
+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,420 points
497 views
0 votes
1 answer