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

Update $env:TF_BUILD to $env:CI after Github Action Switch #4894

Open
JustinGrote opened this issue Jan 18, 2024 · 2 comments
Open

Update $env:TF_BUILD to $env:CI after Github Action Switch #4894

JustinGrote opened this issue Jan 18, 2024 · 2 comments
Assignees
Labels
Issue-Performance Something's slow.

Comments

@JustinGrote
Copy link
Collaborator

JustinGrote commented Jan 18, 2024

This Var doesn't exist in Github Actions, it should be $CI
https://docs.github.com/en/actions/learn-github-actions/variables

if ($env:TF_BUILD) {
Invoke-BuildExec { & npm ci --loglevel=error }
} else {
Invoke-BuildExec { & npm install }
}

Also in PSES
https://github.com/PowerShell/PowerShellEditorServices/blob/70ef45d1655a7e5d37441095e1e5ab37408fe543/PowerShellEditorServices.build.ps1#L107-L108

Probably not causing a failure now but could pull in an unwanted dependency update that breaks the build in difficult to troubleshoot ways.

@andyleejordan please confirm I'm not missing something here.

@andyleejordan
Copy link
Member

Ah so the only thing "missing" is that the release pipeline, where not bringing in a new dependency matters most, is still ADO with this variable. It should instead be $env:TF_BUILD -or $env:CI.

@JustinGrote
Copy link
Collaborator Author

JustinGrote commented Jan 19, 2024

There are other vars in there like the build or PR determination that need to be updated to the GH equivalents as well. Also matching either variable makes sense in case you need to rollback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Performance Something's slow.
Projects
None yet
Development

No branches or pull requests

3 participants