首页 > 其他 > 详细

[Jenkins] Define a pipeline

时间:2017-04-24 09:36:05      阅读:215      评论:0      收藏:0      [点我收藏+]
node{
    stage checkout
    git [github_url]
    
    def project_path="[project_path]"
    
    // everythin in dir block will based on project bath 
    dir(proejct_path) {
        
        stage compiling, test, packing
        sh mvn clean package
        
        stage archival
        step([
            $class: ArtifcatArchiver,
            artifacts: "target/*.jar",
            excludes: null
            ])
    }
}

 

Add ‘stage‘ which we can know what is the progress in a high level way:

技术分享

 

‘sh‘ is for any shell commands.

Pipeline is written in Rudy, so can use rudy syntax to def a variable.

[Jenkins] Define a pipeline

原文:http://www.cnblogs.com/Answer1215/p/6754997.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!