有没有办法将 Jenkinsfile 动态转换为 Drone.yml 管道配置?

Is there any way to dynamically convert a Jenkinsfile into a Drone.yml pipeline configuration?

我目前有一些来自旧 Jenkins CI/CD 管道配置的现有 Jenkinfile。我最近开始将服务迁移到 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 文档非常模糊,没有涵盖许多重要的管道设计方面(至少从我所发现的来看)。

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

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