Mirror of https://gitlab.com/toccoag/tco
- Rust 100%
Tco
Multi-purpose tool aimed at Tocco employees. Simplifies various work tasks.
I've mostly written this for myself but anyone is free to use it and contribute.
Documentation
API: https://toccoag.gitlab.io/devops/tco
Install
-
Install cargo (see https://rustup.rs/).
-
Compile and install:
cargo install --git https://gitlab.com/toccoag/devops/tco.git
Update
-
Update compiler:
rustup update -
Update tco:
cargo install --git https://gitlab.com/toccoag/devops/tco.git
Development
Make sure cargo is installed (see https://rustup.rs/).
Syntax check
cargo check
Linter
cargo clippy --tests
Run all tests
cargo test
Some tests may fail because VSHN's DB servers don't allow enough concurrent SSH connections. If this happens, try adding this to ~/.ssh/config:
Host *
# KnownHostsCommand /usr/bin/sleep 5
ControlMaster auto
ControlPersist 300
ControlPath %d/.ssh/control/%C
Exclude tests that need local secrets (Vault password, ssh key, etc.)
cargo test --no-default-features
Run application
cargo run -- help
Install from cloned repository
cargo install --path .
Speed up build using Cranelift
Cranelift can be used to improve compile time greatly in exchange for a greatly reduce runtime performance.
Check for security advisories and license issues
Install cargo deny:
cargo install --locked cargo-deny
Check:
cargo deny check
Build documentation
cargo doc --open --document-private-items