简体   繁体   English

我可以将 Jenkins 管道写成 Yaml 而不是 groovy 吗?

[英]Can I write my Jenkins pipelines as Yaml instead of groovy?

I want to write and configure my Jenkins pipelines using code like I would do in tools like concourse or Drone.我想使用代码编写和配置我的 Jenkins 管道,就像我在 concourse 或 Drone 等工具中所做的那样。 The idea is not to leave it into UI driven configurations which I have to do even if I use groovy for a lot of it.我的想法是不要将它留在 UI 驱动的配置中,即使我对它的很多使用 groovy 我也必须这样做。

If you are open to using a Jenkins library, wolox-ci will handle what you are looking for.如果您愿意使用 Jenkins 库, wolox-ci将处理您正在寻找的内容。 You will still need a Jenkinsfile, but it will be reduced to this:您仍然需要一个 Jenkinsfile,但它将被简化为:

@Library('wolox-ci') _

node {

  checkout scm

  woloxCi('.woloxci/config.yml');
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM