Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook on pinned build #129

Closed
gregmac opened this issue Mar 11, 2019 · 6 comments
Closed

Hook on pinned build #129

gregmac opened this issue Mar 11, 2019 · 6 comments
Milestone

Comments

@gregmac
Copy link

gregmac commented Mar 11, 2019

We use pinned builds, especially with tags (eg "beta", "RC", "GA"), to signal releases. It would be handy to get notifications in chat/etc when this happens.

  • Add notification event "Build is pinned"
  • Add notification event filter for specific tags (stretch goal)
@netwolfuk
Copy link
Member

Assuming that TeamCity has an extension point for listening to build pins, then this is doable. It is a different type of event, so there will be some plumbing required internally.

Filters might then "just work" with the filter support. No UI for that though.

@netwolfuk
Copy link
Member

Yes. The open API has buildPinned and buildUnpinned events, so I guess I should add support for both events.

@netwolfuk
Copy link
Member

Preliminary support added. When this build finishes, you can try it out.

There is no support in any templates yet, but you should be able to create a legacy JSON webhook, and have a look at the payload. There is a testing endpoint at http://<your_teamcity_instance>/webhooks/endpoint.html, so just point your test webhook at that.

Amongst the payload, you will get...

    "buildTags": [
      "Prod_Release"
    ],
    "pinEventUsername": "netwolfuk",
    "comment": "Pinning as prod_release",

I might change that data in the payload a bit.
It might be more useful to do something like

      "pinEvent": {
          "comment" : "Pinning as prod_release",
          "username": "netwolfuk"
          "type": "pinned"
      },
      "buildTags": [
          "Prod_Release"
      ],

@netwolfuk
Copy link
Member

Btw. I've not done any testing with a filter yet.

@netwolfuk
Copy link
Member

Hi @gregmac Did you get a chance to test this, or do you need a template ready for testing?
If so, what "chat" are you using?

@netwolfuk netwolfuk added this to the v1.2 milestone Jul 5, 2019
netwolfuk added a commit that referenced this issue Jul 20, 2019
netwolfuk added a commit that referenced this issue Jul 20, 2019
@netwolfuk
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants