mirror of
https://github.com/rust-lang/rust.git
synced 2026-03-19 10:59:30 +00:00
Add doc_url attribute to CI jobs
This commit is contained in:
@@ -24,6 +24,8 @@ pub struct Job {
|
||||
/// Free additional disk space in the job, by removing unused packages.
|
||||
#[serde(default)]
|
||||
pub free_disk: Option<bool>,
|
||||
/// Documentation link to a resource that could help people debug this CI job.
|
||||
pub doc_url: Option<String>,
|
||||
}
|
||||
|
||||
impl Job {
|
||||
@@ -103,6 +105,8 @@ struct GithubActionsJob {
|
||||
continue_on_error: Option<bool>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
free_disk: Option<bool>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
doc_url: Option<String>,
|
||||
}
|
||||
|
||||
/// Skip CI jobs that are not supposed to be executed on the given `channel`.
|
||||
@@ -188,6 +192,7 @@ fn calculate_jobs(
|
||||
env,
|
||||
continue_on_error: job.continue_on_error,
|
||||
free_disk: job.free_disk,
|
||||
doc_url: job.doc_url,
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
||||
@@ -40,7 +40,7 @@ try-job: dist-i686-msvc"#,
|
||||
fn pr_jobs() {
|
||||
let stdout = get_matrix("pull_request", "commit", "refs/heads/pr/1234");
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
jobs=[{"name":"mingw-check","full_name":"PR - mingw-check","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"free_disk":true},{"name":"mingw-check-tidy","full_name":"PR - mingw-check-tidy","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"continue_on_error":true,"free_disk":true}]
|
||||
jobs=[{"name":"mingw-check","full_name":"PR - mingw-check","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"free_disk":true},{"name":"mingw-check-tidy","full_name":"PR - mingw-check-tidy","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"continue_on_error":true,"free_disk":true,"doc_url":"https://foo.bar"}]
|
||||
run_type=pr
|
||||
"#);
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ pr:
|
||||
<<: *job-linux-4c
|
||||
- name: mingw-check-tidy
|
||||
continue_on_error: true
|
||||
doc_url: https://foo.bar
|
||||
<<: *job-linux-4c
|
||||
|
||||
# Jobs that run when you perform a try build (@bors try)
|
||||
|
||||
Reference in New Issue
Block a user