Skip to content

Commit 3cf1a68

Browse files
committed
Add doc_url attribute to CI jobs
1 parent 961351c commit 3cf1a68

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Diff for: src/ci/citool/src/jobs.rs

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ pub struct Job {
2424
/// Free additional disk space in the job, by removing unused packages.
2525
#[serde(default)]
2626
pub free_disk: Option<bool>,
27+
/// Documentation link to a resource that could help people debug this CI job.
28+
pub doc_url: Option<String>,
2729
}
2830

2931
impl Job {
@@ -103,6 +105,8 @@ struct GithubActionsJob {
103105
continue_on_error: Option<bool>,
104106
#[serde(skip_serializing_if = "Option::is_none")]
105107
free_disk: Option<bool>,
108+
#[serde(skip_serializing_if = "Option::is_none")]
109+
doc_url: Option<String>,
106110
}
107111

108112
/// Skip CI jobs that are not supposed to be executed on the given `channel`.
@@ -188,6 +192,7 @@ fn calculate_jobs(
188192
env,
189193
continue_on_error: job.continue_on_error,
190194
free_disk: job.free_disk,
195+
doc_url: job.doc_url,
191196
}
192197
})
193198
.collect();

Diff for: src/ci/citool/tests/jobs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ try-job: dist-i686-msvc"#,
4040
fn pr_jobs() {
4141
let stdout = get_matrix("pull_request", "commit", "refs/heads/pr/1234");
4242
insta::assert_snapshot!(stdout, @r#"
43-
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}]
43+
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"}]
4444
run_type=pr
4545
"#);
4646
}

Diff for: src/ci/citool/tests/test-jobs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ pr:
7575
<<: *job-linux-4c
7676
- name: mingw-check-tidy
7777
continue_on_error: true
78+
doc_url: https://foo.bar
7879
<<: *job-linux-4c
7980

8081
# Jobs that run when you perform a try build (@bors try)

0 commit comments

Comments
 (0)