To install the latest version of deploy-helper on macOS or Linux, run the following command:
curl -sSL https://raw.githubusercontent.com/flawiddsouza/deploy-helper/main/install.sh | bashOn Windows, build from source with cargo install --path . --locked (see Development). Local plays are supported on Windows: command:, copy:, template: and powershell: tasks need nothing extra, while shell: needs a POSIX sh on PATH (Git for Windows, with its usr\bin folder added). See docs/deployment-yaml.md for the details.
To set up a development environment for deploy-helper, follow these steps:
- Ensure you have Rust installed on your system.
-
Clone the repository:
git clone https://github.com/flawiddsouza/deploy-helper.git cd deploy-helper -
To build & run the application, use the following command::
cargo run <deploy.yml>
Replace
<deploy.yml>with the path to your deployment configuration file.
cargo install --path . --locked --forceBuilds and installs the deploy-helper binary to your Cargo bin directory, making it available globally.
The installed command reports both the package version and Git commit
through deploy-helper --version.
See docs/cli.md.
Tests are integration tests located in tests/integration_test.rs. Each test runs the binary against a YAML deployment file in test-ymls/ and compares the output to a corresponding .out file.
Tests run against two inventory targets in parallel: a local connection and a remote SSH connection. The SSH target requires Docker. A container is started automatically before the tests run and stopped after.
- Docker must be installed and running.
Note: Tests are written for Linux. On Windows, run them via WSL:
wsl -- bash -c "cargo test"
cargo testcargo test <test_name>For example:
cargo test use_vars_in_task_name