Skip to content

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

Merged
AArnott merged 1 commit into
masterfrom
AArnott-patch-1
May 18, 2018
Merged

AArnott merged 1 commit into
masterfrom
AArnott-patch-1

Conversation

@AArnott

@AArnott AArnott commented May 18, 2018

Copy link
Copy Markdown
Collaborator

No description provided.

@AArnott

AArnott commented May 18, 2018

Copy link
Copy Markdown
Collaborator Author

@onovotny What do you think?

@clairernovotny

clairernovotny commented May 18, 2018

Copy link
Copy Markdown
Contributor

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

AArnott commented May 18, 2018

Copy link
Copy Markdown
Collaborator Author

@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
Copy Markdown

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

AArnott commented May 22, 2018

Copy link
Copy Markdown
Collaborator Author

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

@tzachshabtay

Copy link
Copy Markdown

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.

3 participants