#jenkins #pipeline #struct #convert #data #stages #post

jenkinsfile

a tools to convert Jenkinsfile to data struct

4 releases

0.2.1 Mar 2, 2021
0.2.0 Feb 26, 2021
0.1.1 Feb 25, 2021
0.1.0 Feb 25, 2021

#1 in #stages

LGPL-3.0+

26KB
630 lines

Jenkinsfile

Docs Crates.io Crates.io

a tools to convert Jenkinsfile to data struct.

Usage:

let jenkinsfile = Jenkinsfile::from_str(code).unwrap();

Struct

#[derive(Debug, PartialEq, Eq, Clone)]
pub struct Jenkinsfile {
    pub name: String,
    pub stages: Vec<JenkinsStage>,
    pub post: Vec<PostConfig>,       // todo
}

#[derive(Debug, PartialEq, Eq, Clone)]
pub struct JenkinsStage {
    pub name: String,
    pub steps: Vec<String>,
    pub is_parallel: bool,
    pub sub_stages: Vec<JenkinsStage>,
}

LICENSE

code based on Jenkins Declarative Parser with LGPL 3.0

@ 2020~2021 This code is distributed under the LGPL 3.0 license. See LICENSE in this directory.

Dependencies

~4.5–6.5MB
~126K SLoC