ci_env 0.4.1

Detect CI information from the environment.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::api::{var, CiEnvironment, CiProvider};

pub fn create_environment() -> CiEnvironment {
    CiEnvironment {
        base_branch: None,
        base_revision: None,
        branch: "".into(),
        env_prefix: Some("EAS_".into()),
        head_revision: None,
        id: var("EAS_BUILD_ID"),
        provider: CiProvider::Eas,
        request_id: None,
        request_url: None,
        revision: var("EAS_BUILD_GIT_COMMIT_HASH"),
        url: None,
    }
}