-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add a devtool command for build CI artifacts #4856
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
Merged
Merged
Conversation
This file contains hidden or 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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4856 +/- ##
=======================================
Coverage 84.05% 84.05%
=======================================
Files 251 251
Lines 28061 28061
=======================================
Hits 23588 23588
Misses 4473 4473
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
pb8o
reviewed
Oct 16, 2024
ec323a5 to
d0edede
Compare
pb8o
reviewed
Oct 16, 2024
Script `resources/rebuild.sh` is used mainly to help us re-build CI artifacts. Sometimes, for debugging we would like to be able to build kernels or the rootfs locally. Also, we would like to be able to build each component individually, e.g. only the root filesystem or only guest kernel 6.1. Make the script a bit more clever, adding options for building only rootfs or only kernels (all of them or a single one). Leave the default behaviour intact so we don't break any of its current users. Signed-off-by: Babis Chalios <[email protected]>
Running resources/rebuild.sh script assumes an Ubuntu host (it relies on apt). Add a new `build_ci_artifacts` command in devtool that runs the script inside devctr. This allows us to build CI artifacts without necessarily being in an Ubuntu system. Also, extend resources/rebuild.sh to perform some cleanup after running commands so, at the end, it only produces the directory with the artifacts and no intermediate by-products. Signed-off-by: Babis Chalios <[email protected]>
Building CI artifacts produces some folders under resources/ directory. Include them in .gitignore to avoid, mistakenly, adding them in a git commit. Signed-off-by: Babis Chalios <[email protected]>
Documentation for building guest kernels was pointing to a devtool command that does not exist any more. Fix that by pointing to the newly added `./tools/devtool build_ci_artifacts` command. Also, fix rootfs instructions to use this command rather than directly calling `resources/rebuild.sh` which assumes an Ubuntu host. Signed-off-by: Babis Chalios <[email protected]>
d0edede to
3b602dc
Compare
pb8o
approved these changes
Oct 17, 2024
Manciukic
approved these changes
Oct 17, 2024
bchalios
added a commit
to bchalios/firecracker
that referenced
this pull request
Oct 17, 2024
PR firecracker-microvm#4856 extended the `fix_perms` devtool command to also fix permissions of the directory in which we put CI artifacts from `build_ci_artifacts` command. Since, we are now calling `fix_perms` from two different "workflows", i.e. build/test and CI artifacts building, it might be the case that some of the directories `fix_perms` is trying to fix permissions for, don't exist. Add `-f` flag to `chown` command of `fix_perms`, to avoid issues. Signed-off-by: Babis Chalios <[email protected]>
9 tasks
bchalios
added a commit
that referenced
this pull request
Oct 17, 2024
PR #4856 extended the `fix_perms` devtool command to also fix permissions of the directory in which we put CI artifacts from `build_ci_artifacts` command. Since, we are now calling `fix_perms` from two different "workflows", i.e. build/test and CI artifacts building, it might be the case that some of the directories `fix_perms` is trying to fix permissions for, don't exist. Add `-f` flag to `chown` command of `fix_perms`, to avoid issues. Signed-off-by: Babis Chalios <[email protected]>
ShadowCurse
pushed a commit
to ShadowCurse/firecracker
that referenced
this pull request
Nov 5, 2024
PR firecracker-microvm#4856 extended the `fix_perms` devtool command to also fix permissions of the directory in which we put CI artifacts from `build_ci_artifacts` command. Since, we are now calling `fix_perms` from two different "workflows", i.e. build/test and CI artifacts building, it might be the case that some of the directories `fix_perms` is trying to fix permissions for, don't exist. Add `-f` flag to `chown` command of `fix_perms`, to avoid issues. Signed-off-by: Babis Chalios <[email protected]>
ShadowCurse
pushed a commit
to ShadowCurse/firecracker
that referenced
this pull request
Nov 5, 2024
PR firecracker-microvm#4856 extended the `fix_perms` devtool command to also fix permissions of the directory in which we put CI artifacts from `build_ci_artifacts` command. Since, we are now calling `fix_perms` from two different "workflows", i.e. build/test and CI artifacts building, it might be the case that some of the directories `fix_perms` is trying to fix permissions for, don't exist. Add `-f` flag to `chown` command of `fix_perms`, to avoid issues. Signed-off-by: Babis Chalios <[email protected]>
ShadowCurse
pushed a commit
to ShadowCurse/firecracker
that referenced
this pull request
Nov 5, 2024
PR firecracker-microvm#4856 extended the `fix_perms` devtool command to also fix permissions of the directory in which we put CI artifacts from `build_ci_artifacts` command. Since, we are now calling `fix_perms` from two different "workflows", i.e. build/test and CI artifacts building, it might be the case that some of the directories `fix_perms` is trying to fix permissions for, don't exist. Add `-f` flag to `chown` command of `fix_perms`, to avoid issues. Signed-off-by: Babis Chalios <[email protected]>
ShadowCurse
pushed a commit
to ShadowCurse/firecracker
that referenced
this pull request
Nov 5, 2024
PR firecracker-microvm#4856 extended the `fix_perms` devtool command to also fix permissions of the directory in which we put CI artifacts from `build_ci_artifacts` command. Since, we are now calling `fix_perms` from two different "workflows", i.e. build/test and CI artifacts building, it might be the case that some of the directories `fix_perms` is trying to fix permissions for, don't exist. Add `-f` flag to `chown` command of `fix_perms`, to avoid issues. Signed-off-by: Babis Chalios <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
Add a devtool command to build CI artifacts. The command calls
resources/rebuild.shwithin the dev container, since the script itself assumes an Ubuntu host environment.Also, update the documentation about building guest kernels to point to this script
Reason
Add a command that allows us to build CI artifact kernels locally and also fix the broken documentation about building guest kernels.
Fixes #4757
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.PR Checklist
PR.
CHANGELOG.md.TODOs link to an issue.contribution quality standards.
rust-vmm.