-
Notifications
You must be signed in to change notification settings - Fork 191
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
Run azure pipelines NPM deploy only for tagged commits #49
Comments
I not sure we have something in the environment that looks at the commit being built and determines if there is a tag on it. You can trigger on tags so it is possible you could use the fact that the branch is refs/tags instead of refs/heads in your condition. |
Thank you, I'll try that. It would be sweet if there was tighter integration with git tags to make releases easier. |
You could probably use a contains function in this condition https://github.com/vega/ts-json-schema-generator/blob/master/azure-pipelines.yml#L58 I am trying to think about what options there might be to improve that. In your case it seems you would want to update the triggers section to include triggering on refs/tags and refs/heads Today you can do this
This might be better
and then have a variable automatically set called TagName or something like that. |
Hmm, https://github.com/vega/ts-json-schema-generator/blob/master/azure-pipelines.yml#L24 doesn't seem to trigger builds for tagged commits. Or at least I don't see anything at https://dev.azure.com/vega-vis/ts-json-schema-generator/_build?definitionId=3. |
If you edit that build pipeline in the UI check the triggers tab and make sure that UI configuration is not overriding the YAML config |
Hmm, and now I ran into https://aka.ms/yamlauthz again although it worked before. |
Builds not triggered on tagged commits seems to be a common problem with azure pipelines. See https://visualstudio.uservoice.com/forums/330519-visual-studio-team-services/suggestions/13326927-trigger-build-when-pushing-tag-to-git. @chrisrpatterson is this a known issue? |
It shouldn't be but I will look into it |
Someone just asked the same question on stack overflow: https://stackoverflow.com/questions/52615283/how-do-you-trigger-a-build-in-azure-pipelines-when-a-new-tag-is-pushed-to-github |
I have found at least part of the issue. Pushing new tags to the head commit works fine if you are using the Oauth flow to auth to Github repos but not if you are using the GitHub App flow. This stems from the fact that the events are delivered differently to us from Github in each of those scenarios. We are currently working to address it. |
Thank you for looking into this @chrisrpatterson! I'll have to remember to make manual releases until this is fixed. Is there a public issue I can follow or can you ping me when this is fixed? |
@chrisrpatterson is there a timeline for fixing this in azure pipelines? Otherwise, I might have to revert to using Travis. |
@domoritz sorry for the delay. The fix will rollout on Monday of next week. |
🎉 thank you! |
@chrisrpatterson it still does not work. I don't see any builds for tags. Can you help me? Otherwise, I will return to Travis. |
@domoritz I apologize for this not working. Someone from our engineering team will comment here today and work with you to figure out what might be going on. |
Hi @domoritz, I'm looking into this. Could you please clarify something? How are you authenticated w/ GitHub? Are you using the Azure Pipelines GitHub App? Or are you using OAuth or PAT? Thanks! |
Hi @domoritz, if you are authenticated with the GitHub App, we made a change a few minutes ago. Tags were only working w/ OAuth and PAT, but now they're enabled with the Azure Pipelines GitHub App. If this is still not working for you, could you please tell me what your Azure DevOps account name is? (lukillgo at microsoft dot com if you'd prefer email) Thanks! |
Thank you @chrisrpatterson and @lkillgore. I am using the GitHub integration. Let me make a tagged commit and see what happens. |
Works perfectly. Thank you all! https://dev.azure.com/vega-vis/ts-json-schema-generator/_build/results?buildId=92&view=logs |
Thanks for letting us know! Apologizes for the inconvenience. |
@lkillgore @chrispat Has there been a change recently? My tagged commits are no longer being built. |
We're been seeing this issue too since two days ago. Updated: Sorry I guess this is an Azure Pipelines issue, not necessarily related to this project directly. |
I decided to switch to CircleCI, which also took some.wffort to get working but it works like a charm now. |
@chrisrpatterson could you suggest a solution for this? I can't find a condition that says whether a commit is tagged or not. Right now I get errors because I already have a version published on NPM.
The text was updated successfully, but these errors were encountered: