Strider-CD / strider-github

Github provider for strider
25 stars 34 forks source link

Strider build 'undefined' branch when tag is pushed #74

Closed BluSyn closed 7 years ago

BluSyn commented 7 years ago

Recent strider + plugin upgrade caused this error. Have not yet determined what caused the breaking change.

When I push a new tag to my repo, strider attempts to build it, but <%= ref.branch %> returns undefined. Previously, strider would only build on branch pushes and not on new tags.

It's also possible this was a change in Github's webooks, but I haven't confirmed that. I tried disabling the 'Create' webhook event (Only 'Pull Request' and 'Push' options set), and it still sends a webhook and attempts to build it.

Note: This is causing some havoc with my build scripts, which expect a valid branch name. I've had to add checks for undefined branch in all build scripts so it doesn't cause deployment problems.

screen shot 2016-10-25 at 11 35 30 am screen shot 2016-10-25 at 11 35 49 am
knownasilya commented 7 years ago

Weird, I've experienced the opposite. In the past it would build on tag, but recently (with latest updated) it hasn't triggered on tags.

BluSyn commented 7 years ago

Strange. That's the problem I would prefer to have ;)

I usually push a tag+branch at the same time, and I don't recall it building twice in that case. Now it creates two builds: one with branch name, one undefined.

Version info- Strider v1.9.3 strider-github v2.3.2

Screenshot shows how it looks in build history (tag+branch push):

screen shot 2016-10-25 at 12 02 25 pm
anddimario commented 7 years ago

I'm trying to use tags or release to trigger customs script, but triggers seems that are not fired. I saw that branch is undefined when hook is grabbed from strider, maybe it could be the problem. Have you some suggestions on this problem?

BluSyn commented 7 years ago

It appears this is fixed now. I think it was an issue with Github sending improper/multiple webhooks, and strider interpreting it incorrectly. I do not see this issue now.