This repository has been archived by the owner on Jan 29, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
use serde::Deserialize; | ||
|
||
use crate::helpers::Class; | ||
|
||
use super::{Job, ShortJob}; | ||
use crate::action::CommonAction; | ||
|
||
/// A pipeline project | ||
#[derive(Deserialize, Debug)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct WorkflowMultiBranchProject { | ||
/// Name of the job | ||
pub name: String, | ||
/// Display Name of the job | ||
pub display_name: String, | ||
/// Full Display Name of the job | ||
pub full_display_name: Option<String>, | ||
/// Full Name of the job | ||
pub full_name: Option<String>, | ||
/// Display Name of the job | ||
pub display_name_or_null: Option<String>, | ||
/// URL for the job | ||
pub url: String, | ||
/// Description of the job | ||
pub description: String, | ||
/// Actions of a job | ||
pub actions: Vec<Option<CommonAction>>, | ||
/// List of the jobs | ||
pub jobs: Vec<ShortJob>, | ||
} | ||
|
||
register_class!("org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" => WorkflowMultiBranchProject); | ||
|
||
impl Job for WorkflowMultiBranchProject { | ||
fn url(&self) -> &str { | ||
&self.url | ||
} | ||
|
||
fn name(&self) -> &str { | ||
&self.name | ||
} | ||
} |