Skip to main content

jenkins_api/job/
maven.rs

1use serde::Deserialize;
2
3use crate::helpers::Class;
4
5use super::{BuildableJob, Job, SCMPollable, ShortJob};
6use crate::action::CommonAction;
7use crate::build::{MavenBuild, MavenModuleSetBuild, ShortBuild};
8use crate::property::CommonProperty;
9use crate::queue::ShortQueueItem;
10use crate::scm::CommonSCM;
11
12use super::{BallColor, HealthReport};
13
14job_buildable_with_common_fields_and_impl!(
15    /// A maven project
16    #[derive(Deserialize, Debug)]
17    #[serde(rename_all = "camelCase")]
18    pub struct MavenModuleSet<BuildType = MavenModuleSetBuild> {
19        /// Description of the job
20        pub description: String,
21        /// Is concurrent build enabled for the job?
22        pub concurrent_build: bool,
23        /// SCM configured for the job
24        pub scm: CommonSCM,
25        /// List of modules
26        pub modules: Vec<ShortJob<MavenModule>>,
27        /// List of the upstream projects
28        pub upstream_projects: Vec<ShortJob>,
29        /// List of the downstream projects
30        pub downstream_projects: Vec<ShortJob>,
31        /// Label expression
32        pub label_expression: Option<String>,
33    }
34);
35register_class!("hudson.maven.MavenModuleSet" => MavenModuleSet);
36
37impl BuildableJob for MavenModuleSet {}
38impl SCMPollable for MavenModuleSet {}
39
40job_buildable_with_common_fields_and_impl!(
41    /// A maven module
42    #[derive(Deserialize, Debug)]
43    #[serde(rename_all = "camelCase")]
44    pub struct MavenModule<BuildType = MavenBuild> {
45        /// Description of the job
46        pub description: Option<String>,
47        /// Is concurrent build enabled for the job?
48        pub concurrent_build: bool,
49        /// SCM configured for the job
50        pub scm: CommonSCM,
51        /// List of the upstream projects
52        pub upstream_projects: Vec<ShortJob>,
53        /// List of the downstream projects
54        pub downstream_projects: Vec<ShortJob>,
55        /// Label expression
56        pub label_expression: Option<String>,
57    }
58);
59register_class!("hudson.maven.MavenModule" => MavenModule);
60
61impl MavenModule {}