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

nbgv cloud variables #193

Closed
AArnott opened this issue Jun 30, 2018 · 7 comments
Closed

nbgv cloud variables #193

AArnott opened this issue Jun 30, 2018 · 7 comments

Comments

@AArnott
Copy link
Collaborator

AArnott commented Jun 30, 2018

Add options to set basic cloud build variables as well as "all" variables.
Alternatively, just do what is specified in version.json file, perhaps.

@clairernovotny
Copy link
Member

I think the scenario here should be to remove the need for a dummy project or a special project as described here:
https://github.com/AArnott/Nerdbank.GitVersioning/blob/master/doc/cloudbuild.md#set-cloud-build-variables-from-just-one-project

The default version.json wouldn't have any cloud build numbers enabled, but a user could call the nbgv command in the build script.

It can set the default CloudBuildNumber, override that with -v (works today). New, to add, it can do the set cloud vars and set all vars.

Open question is what the default should be. Any reason not to set everything and have opt-out options?

@clairernovotny
Copy link
Member

Not sure if I'm using it wrong, but it's not detecting/setting the version correctly:

https://dotnetfoundation.visualstudio.com/Humanizer/_build/results?buildId=2573&view=logs

I'm using it here:
https://github.com/Humanizr/Humanizer/blob/c650922298c22a2c6739debbb1d2fa870bba0fcd/.vsts-shared.yml#L13

I've tried it with and without specifying the working directory (where the version.json is)

@AArnott
Copy link
Collaborator Author

AArnott commented Jun 30, 2018

Given the version.json already influences the version and can specify whether all cloud build variables are set (even if overall it is not enabled) how about the default being what the json prescribes?

@clairernovotny
Copy link
Member

clairernovotny commented Jun 30, 2018

Fair enough, though that makes it a bit non-deterministic from looking only at the command line params. I don't know how it feels to have the default options controlled by that, which could easily be different per project.

It seems line the command line should be explicit one way or the other?

@AArnott
Copy link
Collaborator Author

AArnott commented Jun 30, 2018

Fair point. I'll plan to make a consistent default.

@AArnott
Copy link
Collaborator Author

AArnott commented Jun 30, 2018

I found the bug that prevented nbgv cloud from writing out the version, causing your build failure, @onovotny. I have a fix that will be included in this feature request.

@AArnott
Copy link
Collaborator Author

AArnott commented Jul 1, 2018

Fix is now published to nuget.org as v2.1.65

AArnott added a commit that referenced this issue Apr 16, 2023
Add ASP.NET Core runtime installation support
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