pub struct CiEnvironment {
pub provider: CiProvider,
pub is_ci: bool,
pub branch: Option<String>,
pub commit: Option<String>,
pub pr_number: Option<String>,
pub build_number: Option<String>,
pub artifacts_dir: PathBuf,
}Expand description
CI environment information
Fields§
§provider: CiProviderCI provider
is_ci: boolWhether running in CI
branch: Option<String>Branch name (if available)
commit: Option<String>Commit SHA (if available)
pr_number: Option<String>Pull request number (if available)
build_number: Option<String>Build number (if available)
artifacts_dir: PathBufArtifacts directory
Implementations§
Source§impl CiEnvironment
impl CiEnvironment
Sourcepub fn provider_name(&self) -> &str
pub fn provider_name(&self) -> &str
Get provider name
Sourcepub fn annotate_error(&self, file: &str, line: u32, message: &str)
pub fn annotate_error(&self, file: &str, line: u32, message: &str)
Emit GitHub Actions annotation for error
Sourcepub fn annotate_warning(&self, file: &str, line: u32, message: &str)
pub fn annotate_warning(&self, file: &str, line: u32, message: &str)
Emit GitHub Actions annotation for warning
Sourcepub fn start_group(&self, name: &str)
pub fn start_group(&self, name: &str)
Start a collapsible group in CI output
Sourcepub fn set_output(&self, name: &str, value: &str)
pub fn set_output(&self, name: &str, value: &str)
Set output variable (GitHub Actions)
Trait Implementations§
Source§impl Clone for CiEnvironment
impl Clone for CiEnvironment
Source§fn clone(&self) -> CiEnvironment
fn clone(&self) -> CiEnvironment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CiEnvironment
impl Debug for CiEnvironment
Auto Trait Implementations§
impl Freeze for CiEnvironment
impl RefUnwindSafe for CiEnvironment
impl Send for CiEnvironment
impl Sync for CiEnvironment
impl Unpin for CiEnvironment
impl UnwindSafe for CiEnvironment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more