-
Notifications
You must be signed in to change notification settings - Fork 505
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
Reduce handling of Github during stage and release #2127
Conversation
/hold for discussion in https://kubernetes.slack.com/archives/G0162T1RYHG/p1623901053068200 |
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.
@puerco -- Looking good; just a few message nits.
/hold until you're happy with the test stages/releases
pkg/release/workspace.go
Outdated
|
||
repo, err := git.OpenRepo(directory) | ||
if err != nil { | ||
return errors.Wrap(err, "opening sytaged clone of k/k") |
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.
return errors.Wrap(err, "opening sytaged clone of k/k") | |
return errors.Wrap(err, "opening staged clone of k/k") |
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.
Both nits are done, sorry batteries are out 🔋
krel now resets the origin remote on the stages clone of kubernetes/kubernetes. If for some reasone we need to change the github token between staging and release, krel will now reset it in the staged sources. Signed-off-by: Adolfo García Veytia (Puerco) <adolfo.garcia@uservers.net>
Since all git operations in kubernetes/kubernetes during stage only involve the local clone of the repository, we do not set the authenticated git remote to avoid the risk of the token ending in the stage bucket. Signed-off-by: Adolfo García Veytia (Puerco) <adolfo.garcia@uservers.net>
To avoid having the github token archived in the release bucket, we now destroy the git remote configuration before archiving the release. Signed-off-by: Adolfo García Veytia (Puerco) <adolfo.garcia@uservers.net>
/lgtm Rate limit: |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: justaugustus, puerco The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Tested and verified. |
OK, this one is ready. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR introduces the following changes:
krel now resets the origin remote on the staged clone of kubernetes/kubernetes. If for some reason we need to change the Github token between staging and release, krel will now reset it in the staged sources.
Since all git operations in kubernetes/kubernetes during stage only involve the local clone of the repository, we do not set the authenticated git remote to avoid the risk of the token ending in the stage bucket.
During the release stage, to avoid having the github token archived in the release bucket, we now destroy the git remote configuration before archiving the release.
Signed-off-by: Adolfo García Veytia (Puerco) adolfo.garcia@uservers.net
Which issue(s) this PR fixes:
Fixes #1645
Special notes for your reviewer:
/priority critical-urgent
/assign @justaugustus @jeremyrickard @saschagrunert
/milestone v1.22
Does this PR introduce a user-facing change?