Skip to content
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

Deploy refinement #559

Merged

Conversation

rodrigosiqueira
Copy link
Collaborator

I have been working to improve the overall quality of the deploy code; as a result, this PR is part of this effort. Here, you will see some simple code refactor that will make adding support for other distros and systems easier.

@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2022

Codecov Report

Merging #559 (8ebb97b) into unstable (fa872ad) will decrease coverage by 0.24%.
The diff coverage is 71.61%.

Impacted file tree graph

@@             Coverage Diff              @@
##           unstable     #559      +/-   ##
============================================
- Coverage     73.21%   72.96%   -0.25%     
============================================
  Files            34       34              
  Lines          5155     5211      +56     
============================================
+ Hits           3774     3802      +28     
- Misses         1381     1409      +28     
Impacted Files Coverage Δ
src/kw_config_loader.sh 56.75% <0.00%> (-1.58%) ⬇️
src/plugins/kernel_install/arch.sh 78.84% <0.00%> (-1.55%) ⬇️
src/plugins/kernel_install/debian.sh 77.14% <0.00%> (-2.27%) ⬇️
src/plugins/kernel_install/remote_deploy.sh 0.00% <0.00%> (ø)
src/plugins/kernel_install/utils.sh 80.59% <67.56%> (-4.89%) ⬇️
src/kwlib.sh 92.82% <75.00%> (-0.33%) ⬇️
src/deploy.sh 64.56% <79.16%> (+0.20%) ⬆️
src/plugins/kernel_install/grub.sh 93.75% <100.00%> (+2.57%) ⬆️
src/remote.sh 88.76% <100.00%> (+0.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa872ad...8ebb97b. Read the comment docs.

rodrigosiqueira and others added 7 commits February 2, 2022 07:32
Currently, kw does not provide an easy mechanism to change where kw
deploys the necessary scripts and the temporary folder, which can add
unnecessary constraints to users. This commit introduces two new
configuration variables that enable users to specify where they want to
save kw files in the remote and which folder they want to use for
temporary files during the deploy.

Closes: kworkflow#470

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
In the ArchLinux machine, kw leaves a lot of leftover files on the
uninstall option. This commit fixes this issue and refactors the core
function related to the kernel uninstall to make it simple and scalable.

Closes: kworkflow#186

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
When we run kw remote, we have to deal with a tiny interface that
expects two parameters every time; as a result, in the deploy code, we
repeat those standard parameters over and over again. This hurts the
code readability and damages the idea of interface; this commit solves
this problem by creating a standard prefix to interact with the remote
interface.

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Add lzop as a default compression in the deploy process and also enable
users to set their preferable compression algorithm.

Closes kworkflow#188

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
kw deploy generates a very polluted output, this commit cleanup the
output by:

* Hide unnecessary command log
* Use progress bar for modules_install
* Add messages per deploy milestone
* Add --verbose in case user want to know every step

Note: This is part of the issue kworkflow#179

Signed-off-by: Rodrigo Siqueira <siqueirajordao@riseup.net>
This commit is a simple code refactor that extracts the config copy from
the host machine to the target machine to a single function.

Signed-off-by: Rodrigo Siqueira <siqueirajordao@riseup.net>
We are expanding the set of distros supported by kw; as a result, the
detect_distro was implemented in a way that is hard to expand the set of
the supported distro. This commit adds an array per distro family to
address this problem, where each element represents a specific
derivative distro.

Signed-off-by: Rodrigo Siqueira <siqueirajordao@riseup.net>
@rodrigosiqueira rodrigosiqueira merged commit be0b499 into kworkflow:unstable Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants