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 remote rework #536

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/unit_tests.yml
Expand Up @@ -12,9 +12,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Update the system
run: |
sudo apt-get update -y

- name: Install dependencies
run: |
sudo apt install -y shunit2 kcov bash git \
sudo apt-get install -y shunit2 kcov bash git \
python-docutils dash graphviz python3-sphinx

- name: Prepare for tests
Expand Down
14 changes: 14 additions & 0 deletions documentation/man/features/deploy.rst
Expand Up @@ -7,6 +7,7 @@ kw-deploy
SYNOPSIS
========
*kw* (*d* | *deploy*) [\--remote <remote>:<port> | \--local | \--vm]
[\--setup]
[-r | \--reboot] [-m | \--modules] [-s | \--ls-line]
[-l | \--list] [-a | \--list-all]
[(-u | \--uninstall) <kernel-name>[,...]] [-f \--force]
Expand Down Expand Up @@ -64,6 +65,10 @@ OPTIONS
-r, \--reboot:
Reboot machine after deploy.

\--setup:
This command runs a basic setup in the target machine, including installing
packages and preparing the distro for the deploy.

-m, \--modules:
Only install/update modules.

Expand Down Expand Up @@ -117,3 +122,12 @@ version, you can use::

cd <kernel-path>
kw bd

Now, let's say that you set up your configuration file to deploy your new
kernel to a machine reachable via ssh. You can run the following command in
order to prepare your target machine to receive your new kernel via `kw d`::

kw deploy --setup

Alternatively, you can just run `kw d` directly; the standard behavior will
automatically run the setup operation in your first deploy.
4 changes: 2 additions & 2 deletions kw
Expand Up @@ -92,7 +92,7 @@ function kw()
(
include "$KW_LIB_DIR/deploy.sh"

kernel_deploy '' "$@"
deploy_main '' "$@"
local ret="$?"
alert_completion 'kw deploy' "$1"
return "$ret"
Expand All @@ -103,7 +103,7 @@ function kw()
include "$KW_LIB_DIR/deploy.sh"
include "$KW_LIB_DIR/build.sh"

kernel_build && kernel_deploy 1 "$@"
kernel_build && deploy_main 1 "$@"
local ret="$?"
alert_completion 'kw db' "$1"
return "$ret"
Expand Down
2 changes: 1 addition & 1 deletion run_tests.sh
Expand Up @@ -133,7 +133,7 @@ function run_tests()
local test_failure_list=''

for current_test in "${TESTS[@]}"; do
target=$(find ./tests -name "*$current_test*.sh")
target=$(find ./tests -name "$current_test*.sh")
if [[ -f "$target" ]]; then
say "Running test [${current_test}]"
say "$SEPARATOR"
Expand Down
2 changes: 1 addition & 1 deletion src/bash_autocomplete.sh
Expand Up @@ -30,7 +30,7 @@ function _kw_autocomplete()
--history --disable --list --follow --reset --help'

kw_options['deploy']='--force --list --list-all --local --ls-line --modules
--reboot --remote --uninstall --vm'
--reboot --remote --uninstall --vm --setup'
kw_options['d']="${kw_options['deploy']}"

kw_options['device']='--local --remote --vm'
Expand Down