ci_info
Provides current CI environment information.
Overview
This library main goal is to provide development/build tools such as cargo-make the needed information on the current CI environment. Inspired by the ci-info npm module.
Usage
Simply include the library and invoke the get function to pull all info as follows:
Fetching Info
Mocking CI environment
use ;
Installation
In order to use this library, just add it as a dependency:
[dependencies]
ci_info = "^0.14.15"
There is optional serde support that can be enabled via the serde-1 feature:
[dependencies]
ci_info = { version = "*", features = ["serde-1"] }
Iterating Over Vendor Variants
You can enable iteration over all Vendor enum variants by enabling iter feature:
[dependencies]
ci_info = { version = "^0.14.14", features = ["iter"] }
This allows you to programmatically access all supported CI vendors:
use Vendor;
use IntoEnumIterator;
// List all supported CI vendors
for vendor in iter
// Check how many vendors are supported
let count = iter.count;
println!;
// Filter for specific vendors
let cloud_vendors: = iter
.filter
.collect;
Note: Iteration uses strum's EnumIter derive macro under a feature flag.
Run complete example with: cargo run --example iterate_vendors --features iter
API Documentation
See full docs at: API Docs
Contributing
Release History
See Changelog
License
Developed by Sagie Gur-Ari and licensed under the Apache 2 open source license.