I have configured a Jenkins/Gitea for a CD setup.
Jenkins - 2.414.3/Gitea - 1.21
On the Jenkins side all the necessary plugins (I hope) are installed:
git-client, gitea, git, basic-branch-build-strategies
in addition to many other required ones.
I have created a gitea organisation and have the following configuration:
Manage Jenkins->System->Git Plugin->Add git tag action to jobs ==> Enabled
My Gitea Organisation->Configure->Repository Sources->Discover tags ==> Added
My Gitea Organisation->Configure->Repository Sources->Discover branches ==> All branches
My Gitea Organisation->Configure->Repository Sources->Fetch tags ==> Enabled
My Gitea Organisation->Configure->Repository Sources->Specify ref specs => +refs/heads/*:refs/remotes/@{remote}/* +refs/tags/*:refs/remotes/@{remote}/tags/*
My Gitea Organisation->Configure->Child Scan Triggers ==> 15 minutes
When I push branches, they get picked up by the organisation instantly and built. However, when I push tags (all annotated), they do not get picked up by the Jenkins.
On the gitea side, it delivers the webhook and get a 200 response from the Jenkins. Here is the first few lines of the 'Content' of the webhook:
{
"ref": "refs/tags/testrollout_20240104_1",
"before": "0000000000000000000000000000000000000000",
"after": "06ae9358ab5ef000000000e3b69228cb84f42f43",
On the Jenkins side in:
My Gitea Organisation->My repo->Multibranch Pipeline Events
I could see that the tag event was received and could see the following:
Checking tag testrollout_20240104_1
annotated tag: GiteaAnnotatedTag{sha='06ae9358ab5ef000000000e3b69228cb84f42f43', tag='testrollout_20240104_1', message='Create annotated tag for testing 1
', url='http://mygitea/api/v1/repos/myorg/myrepo/git/tags/06ae9358ab5ef000000000e3b69228cb84f42f43', tagger=Tagger{name='name', email='email@email', date='full utc date'}, object=TaggedObject{type='commit', url='http://mygitea/api/v1/repos/myorg/myrepo/git/commits/8366400000000000fee1fea6f380d2c98a1caf58', sha='8366400000000000fee1fea6f380d2c98a1caf58'}, verification=null}
1 tags were processed
The tag does not appear in the 'Tags' tab of the Jenkins Gitea organisation. However, due to the setting:
My Gitea Organisation->Configure->Child Scan Triggers ==> 15 minutes
When the multibranch pipeline job scans the repo on the 15th minute (which will be longer in the actual implementation) the tag gets picked up (and built as per the Jenkinsfile).
Why my tag push is not appropriately processed like a branch and that I have to wait for the scan threshold to cross? Am I missing anything?
Please let me know if you need more information in this regard.
Apologies for the long post. Thanks very much for you time.