首页 > 代码库 > [Jenkins] Define a pipeline
[Jenkins] Define a pipeline
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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。