We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
CiEnv::is_rust_lang_managed_ci_job
1 parent 6658c8e commit 2d85139Copy full SHA for 2d85139
src/tools/build_helper/src/ci.rs
@@ -19,6 +19,15 @@ impl CiEnv {
19
pub fn is_ci() -> bool {
20
Self::current() != CiEnv::None
21
}
22
+
23
+ /// Checks if running in rust-lang/rust managed CI job.
24
+ pub fn is_rust_lang_managed_ci_job() -> bool {
25
+ Self::is_ci()
26
+ // If both are present, we can assume it's an upstream CI job
27
+ // as they are always set unconditionally.
28
+ && std::env::var_os("CI_JOB_NAME").is_some()
29
+ && std::env::var_os("TOOLSTATE_REPO").is_some()
30
+ }
31
32
33
pub mod gha {
0 commit comments