TrimbleSolutionsCorporation / TeamcityTriggerHook

Bitbucket Plugin to Trigger Builds in Teamcity
GNU Lesser General Public License v3.0
14 stars 15 forks source link

Tag trigger not working #77

Open ton252 opened 2 years ago

ton252 commented 2 years ago

I've tried to run TeamCity build on tag trigger, but noting happened.

Bitbucket Plugin Configuration:

"4f477ddb-61cf-4c7f-b30f-e041f831e0a0": {
        "regex": "refs/tags/(.*)",
        "target": "TARGET",
        "type": "build",
        "triggerOnEmptyBranches": true,
        "triggerWhenNoReviewers": true,
        "triggerOnPullRequest": false,
        "hideOnPullRequest": false,
        "cancelRunningBuilds": false,
        "triggerInclusion": "",
        "triggerExclusion": "",
        "downStreamTriggerType": "build",
        "downStreamTriggerDescription": "",
        "downStreamTriggerTarget": ""
 }

TeamCity VCS Configuration:

Default branch:
  refs/heads/master
Branch specification:
  +:refs/tags/(*)
  +:refs/heads/master
  +:refs/heads/(rc/*)
  +:refs/heads/(feature/*)
  +:refs/heads/(bugfix/*)
  +:refs/heads/(hotfix/*)
Use tags as branches:
  true

I've checked using post request using TeamCity API (everything works fine): curl -k -u user:password --request POST https://teamcity-cicdl.corp.dev.vtb/app/rest/buildQueue --header "Content-Type:application/xml" --data-binary @build.xml

<build branchName="1.9.1t">
  <buildType id="TARGET"/>
</build>
jmecosta commented 2 years ago

its quite possible that tags are not supported. Typically we trigger once we see new commits pushed to branches... you cant do that with a tag...

for tags its possible that we need to hook to some new events in the plugin side... but this is not implemented... you could try to check if its possible by spining a dev instance.

i dont have much time at the moment to look at this, but feel free to provide support for it if you can make it work.