-
Notifications
You must be signed in to change notification settings - Fork 64
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
ci: update azure SP federated credentials #1442
Merged
akashsinghal
merged 9 commits into
ratify-project:dev
from
akashsinghal:akashsinghal/azurespn
May 8, 2024
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d417d10
ci: update Azure SP federated credentials
akashsinghal d7b5bc4
fix token scope
akashsinghal 0608d04
upgrade az cli
akashsinghal 096f28e
fix
akashsinghal d869324
update clean up trigger
akashsinghal c2a4647
update trigger
akashsinghal fa46c6a
Merge branch 'dev' into akashsinghal/azurespn
akashsinghal 7e64999
updates
akashsinghal 5f9861c
Merge branch 'dev' into akashsinghal/azurespn
binbin-li File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was mentioned during the Meeting (but i forgot sorry) , could you remind me how the environment property is used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without the env, will the cached token be accessible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Environment are a github construct to represent a target deployment type. So testing, dev, prod, etc. In the environment, you can setup workflows, secrets, and variables that target that environment. So in our case, we would define a new environement
azure-test
and this environment contains all the necessary creds for our azure e2e tests. Read more about environments here.In our workflows, we use
Azure/login
action to auth. The federated credential acceptsenvironment
as one of the scopes for federated credential. This means for each unique<org>/ratify
combination, we could setup one federated credential that will target an environmentazure-test
. This means that fordeislabs
we'd have one cred and for each person's fork we would have another. There are other scopes supported for federated credentials like branches however it becomes cumbersome if we want to manually trigger tests from a specific feature branch. This is why environment is helpful.Now there is some downside (potentially) for using environment. Now, the new environment will show up on the main github repository name.
And what's unfortunate is that for each aks run, it generates 6 entries under
Deployments
and if there are failures in thelatest
one (this seems arbitrary what is latest of the matrix), then the deployment shows as failed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So in conclusion we have 2 options for federated credential scope.
dev
branch to run all tests on your fork.