ADO: Change full checkout persistCredentials
default back to false
#10553
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
A change in beachball behavior means we need to make sure we have (the right) credentials ready to run beachball commands in our various ADO pipelines.
I made some temporary workarounds to unblock pipelines:
This PR updates our pipelines to use the most appropriate credentials for the tasks they need to run.
Type of Change
Why
The temporary workarounds made all "full checkouts" in ADO persist the credentials used to checkout the repo, but that will override using any other credentials later in the pipeline.
In the case of publish, we actually need rnbot's admin credentials, so the publish pipeline reverts to the previous behavior of no longer persisting creds at checkout and instead configuring for rnbot's creds.
However, many other tasks do trivial/temporary local repo operations using rnbot's credentials. This is an unnecessary (and potentially risky) elevation that we shouldn't do anymore.
What
This PR sets "full checkouts" back to not persisting credentials by default, because most tasks don't need them. Then, in the places where we do need credentials for later git/beachball commands, we choose from this prioritized list:
persistCredentials
totrue
, and use the (less-powerful) credentialsMicrosoft Reviewers: Open in CodeFlow