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
Expose TriggeredBuildIds
as multi-job/stage variable
#208
Comments
Hi @ChristoWolf I think you are right, it's currently just available for tasks in the same job. When a new update is coming I can try to check where I would need to make a change so it could also be available for tasks in following jobs. In the meantime one way you could use would be to use a powershell script (or similar) and make it available like that (as I can't give you any ETA on when I'll get to do some update). The docs should give some hint, but probably something like this would work (this is code from the top of my head - not tested so there might be errors...):
If everything works correctly the variable TriggeredBuildIdsGlobal should then be available for subsequent tasks in any following job via |
Hi @huserben! Thanks for the quick reply! One then still also has to inject the variable into the job then, but yes, that is exactly what I have done. Anyways, thanks for these great extensions, very useful stuff! |
What exactly do you mean by "inject into the job"? |
Sorry for being unclear. |
Sorry for the long wait, I missed that you answered so fast :-) Yes, I think there is no other way (technically from Azure Pipelines), or is there? :-) I'm planning on creating a new version in the near future, so what I could do is the following:
Am I missing something or would you expect something else? Thanks for your support |
Hey @huserben! No worries, you responded quickly anyways :) IMO, the first change regarding the automatic propagation as an output variable is not really needed. However, I do absolutely agree that the docs should reflect this, i.e. that the consumer needs to make explicit use of Azure Pipelines' usual multi-job/multi-stage variables mechanism to use But these are just my opinions, of course feel free to disagree/agree wherever :) |
Hi @ChristoWolf I just published a new version of the task with an updated documentation. I took the very easy road and more or less added your statement from above together with links to the docs from microsoft and this issue: Do you think this will be sufficient? Or should something else be added? Thanks for your support. |
Hi @huserben! Thanks for all the quick effort, very appreciated! The doc addition looks great, the only I thing I think would still make sense to change/update would be the usages of But again, please feel free to disagree! Also, thanks for listing me as a contributor in the release, really wasn't necessary, but I appreciate it :) |
Hi @ChristoWolf thanks for spending time on a sunday to give me feedback. You are right, I did not think about adjusting this, but it certainly makes sense. I do highly appreciate people taking the time to write here in order to improve the task, this will help others using the task as well. So most certainly you (and everyone else raising issues) is contributing and therefore deserves a mention :-) |
Hi @huserben! Well, sorry for disrupting your weekend! |
Hi @ChristoWolf finally found the time to do some pending updates of the documentation. I hope that makes it a bit more clear for the readers in future. Do you think it's fine now and we can close this issue or do you see other things that are still pending? |
Sounds perfect, thanks @huserben! |
Hi @huserben!
Your Trigger Build Task guide on the VS marketplace specifies for the
TriggeredBuildIds
variable, thatHowever, unless I missed something, this only holds true for tasks in the same job.
I'll try to propagate the variable as a multi-job variable on my own for now, but I think it would be useful if it was exposed to the whole build in general by default or through an option.
The text was updated successfully, but these errors were encountered: