【问题标题】:Is there any way to dynamically convert a Jenkinsfile into a Drone.yml pipeline configuration?有没有办法将 Jenkinsfile 动态转换为 Drone.yml 管道配置?
【发布时间】:2020-01-30 14:51:25
【问题描述】:

我目前有一些来自旧 Jenkins CI/CD 管道配置的现有 Jenkins 文件。我最近开始将服务迁移到 Drone CI,但不太确定一些 Jenkins (groovy) 命令如何转换为 Drone 的 yaml 语法。

示例(编辑/示例):

// ...
stage('version')
  choice = new ChoiceParameterDefinition('VERSION', ['x', 'y', 'z'] as String[], '...')
  def type = input(id: 'type', message: 'Select one', parameters: [choice])

stage('Tag') {
  sh "./some-script/.sh -t ${type}"
}
// ...

有什么可以自动进行转换的吗? DroneCI 文档非常模糊,没有涵盖许多重要的管道设计方面(至少不是我发现的)。

【问题讨论】:

    标签: jenkins continuous-integration yaml drone.io


    【解决方案1】:

    不幸的是,这在 DroneCI 中无法通过相同的方式实现。这是因为 Jenkins 允许在运行管道时从 UI 输入输入,而 DroneCI 不允许。

    但是,您可以在不同的文件中指定属性,例如版本号,管道可以相应地识别和处理。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-07-10
      • 1970-01-01
      • 2020-12-30
      • 2014-11-06
      • 2017-03-25
      • 2021-09-01
      • 2021-05-15
      相关资源
      最近更新 更多