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

Variables passed into Badge name only resolve to default values #4

Open
markusstephanides opened this issue Jan 3, 2024 · 6 comments

Comments

@markusstephanides
Copy link
Contributor

Hi!

When using parameters for the badge name, e.g. %env.platform%-%env.build_configuration%, looking at UnrealGameSync the badge created will only use the default values for the parameters instead of the actual passed parameters. I have also double checked, that the variables I used here are actually changed and set in the build.

Am I doing something wrong or does something need to be implemented into the plugin to re-resolve the variables?

@jorgenpt
Copy link
Owner

jorgenpt commented Jan 7, 2024

@markusstephanides I don't think any of our badges use that functionality, so I'll have to look into it. Is it true for all the statuses of your badge? It's possible that commit status publishers runs in a manner where it's not evaluating the variables in the context of the build job itself. I'll take a peek.

@markusstephanides
Copy link
Contributor Author

Yes, it is. Thanks for looking into this!

@jorgenpt
Copy link
Owner

jorgenpt commented Jan 8, 2024

I've filed a ticket with TeamCity support about this, as I don't see anything obvious I'm supposed to do to expand them. The values are used verbatim from SBuildFeatureDescriptor.getParameters (as that's what's passed in to the plugin), and so if they're expanding to some value, then I don't even know how I'd go about getting the unexpanded variables and expanding them "correctly".

@jorgenpt
Copy link
Owner

Sounds like the default behavior of the parameters passed to commit-status-publisher is to resolve it without the context of the specific build (possibly because these can change during the run of the build). I am chatting with a TeamCity dev about the best way to address it in my plugin, if possible.

@markusstephanides
Copy link
Contributor Author

Ok, thank you very much for the effort and keeping me posted!

@markusstephanides
Copy link
Contributor Author

Hi, do you have any updates about this?
Thx!

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

No branches or pull requests

2 participants