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

Advise folks to set cloud build variables from just one project #180

Merged
merged 1 commit into from
May 18, 2018

Conversation

AArnott
Copy link
Collaborator

@AArnott AArnott commented May 18, 2018

No description provided.

@AArnott
Copy link
Collaborator Author

AArnott commented May 18, 2018

@onovotny What do you think?

@clairernovotny
Copy link
Member

clairernovotny commented May 18, 2018

That works. One other idea, that's more deterministic and perhaps a better option for this scenario, is packaging NB.GV as a .NET Core Global tool. It can return a json object like the Get-Version.ps1 then take parameters to set the variables optionally.

This has a benefit over the ps1 file because it's easier to invoke, especially outside powershell. Today, I do something like https://github.com/NuGetPackageExplorer/NuGetPackageExplorer/blob/master/Build/build.yml#L29-L32, but it'd be easier to do:

dotnet tool install NB.GV
NB.GV /setEnvVars

I could easily reference them everywhere I needed.

Thoughts?

@AArnott
Copy link
Collaborator Author

AArnott commented May 18, 2018

@onovotny I hadn't heard of .NET Core Global tools. Thanks for the tip. It looks like it's new in .NET Core 2.1, so too early to document anything for it, I think. So I'll complete this PR and open an issue to track.

@AArnott AArnott merged commit 380a55c into master May 18, 2018
@AArnott AArnott deleted the AArnott-patch-1 branch May 18, 2018 19:27
@tzachshabtay
Copy link

Hi @AArnott it's not clear from this doc whether the "put the cloud variables in one project" advice also applies to the "buildNumber" and "setAllVariables" attributes, or just relevant to "setVersionVariables". Can you clarify?

It's also not clear if I need to set "setVersionVariables" if I already set "setAllVariables".

Thanks.

@AArnott
Copy link
Collaborator Author

AArnott commented May 22, 2018

Thanks for the feedback, @tzachshabtay. Does #183 help?

@tzachshabtay
Copy link

Thanks @AArnott, looks good.

AArnott added a commit that referenced this pull request Feb 8, 2023
This is in an attempt to fix #180
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

Successfully merging this pull request may close these issues.

None yet

3 participants