-
Notifications
You must be signed in to change notification settings - Fork 930
ci: add Cloudsmith cleanup job on PR close #3115
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
base: main
Are you sure you want to change the base?
Conversation
40363d2 to
d074040
Compare
stefpopa
left a comment
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.
Just a couple of questions. Feel free to disagree!
stefpopa
left a comment
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.
One more small question and as a note, you can fill the PR description in the future.
|
|
||
| clean-cloudsmith: | ||
| runs-on: [self-hosted, repo-only] | ||
|
|
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.
one more question about this: should we explicitly set permissions? Looking at other jobs in main.yml or top-level.yml, every single job explicitly sets permissions. I don't know what the permission level should be set here, maybe read would be enough?
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.
Permission are required, in particular we need to pass checks-ids (or like that) for OICD to work.
We must explicitly pass secrets as well, because there is a subtle difference between this org and the enterprise, for enterprise, secrets inherit does not work (pass secrets), so we end-up with here working, and in the mirror failing!
Add a clean-cloudsmith job to pr-closed.yml that removes PR artifacts from Cloudsmith when a PR is merged or closed. Uses wiki-scripts/cloudsmith_helper.py remove_item_from_location method to delete all packages matching the PR version pattern. Signed-off-by: Liviu Tomoiaga <Liviu.Tomoiaga@analog.com>
d074040 to
c2d548f
Compare
gastmaier
left a comment
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 will run at the enterprise mirror!
The enterprise mirror does not have azure attached.
you must explicitly match === analogdevicesinc
| clean-gh-pages: | ||
| runs-on: [self-hosted, repo-only] | ||
| permissions: | ||
| contents: write | ||
|
|
||
| steps: | ||
| - uses: analogdevicesinc/doctools/gh-pages-rm-path@action | ||
| with: | ||
| path: pull/${{ github.event.number }} |
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 whole step shouldn't exist anymore,
we removed doc.yaml at
150ad9a#diff-7871fa1d10e6bf511d9cfda5a6874d1a75acb950fb1bc9fee6057eff13257521
I will open a pull request
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.
|
Overall, I believe we should aim to have retention of artifacts instead of erasing on pr-close branch main tags etc it is simpler to implement at scale |
Implementation of a Retention Policy is something that definitive we can agree on. I have the same opinion about this. And as far as I know, on sdg_linux, sdg_linux_rpi (and also linux ?) there are no retention policies set. Maybe we can agree on a set of rules based on the documentation . About deleting a cloudsmith atefact if the pr-state is closed - for this I think we still need a post action that is triggered on an close PR event. I do not think that Cloudsmith has a hook that could be leverage for this purpose. |
Add a clean-cloudsmith job to pr-closed.yml that removes PR artifacts from Cloudsmith when a PR is merged or closed.
Uses wiki-scripts/cloudsmith_helper.py remove_item_from_location method to delete all packages matching the PR version pattern.
PR Description
necessary to understand them. List any dependencies required for this change.
any space), or simply check them after publishing the PR.
description and try to push all related PRs simultaneously.
PR Type
PR Checklist