Drone-yaml archived?

I’m trying to submit a PR for drone-yaml to fix volume mounts on windows but it seems the project is archived? It’s still referenced by drone-cli, is it being refactored somewhere else?

the drone-yaml and drone-runtime repositories were deprecated in favor of github.com/drone/drone-runner-docker. we have not updated the drone-cli repository yet to use this new repository, however, this is planned.

1 Like

Thanks! Would you accept PRs for drone-cli to help move in that direction?

@bradrydzewski
i’m sorry, but github.com/drone/drone-runner-docker is not found. (maybe you mean https://hub.docker.com/r/drone/drone-runner-docker?)

I want to use drone-yaml to automatically analyze and modify 200+ repositories in our company. But, drone-yaml is archived. What should i do? Can i use it now and then change to another way to launch it later or it deprecated and never returns, and i should find another way to analyze and modify .drone.yml?

1 Like

I was also disappointed to see drone-yaml archived with no explanatory note and no link to / recommendation for a replacement.

I’m in a similar boat as @AmsTaFFix - I’d like to be able to programmatically manipulate Drone YAML across many repositories.

Each runner defines its own yaml syntax and anyone in the community can (and people do) create their own runners with their own yaml syntax. This is conceptually similar to the way Kubernetes operators define their own yaml spec. This means there is no longer a single, centrally managed Drone yaml specification which means we can no longer rely on a central, strongly typed yaml library.

With that being said, you should be able to use any standard yaml parser to parse and modify a Drone yaml. For example, here is a simple JS snippet that demonstrates how this could work:

var yaml = require("js-yaml")

var data = `
kind: pipeline
type: docker
steps:
- name: test
  image: golang
  commands:
  - go test
`

// parse the pipeline yaml
var pipeline = await(yaml.load(data));

// convert docker pipeline to a kubernetes pipeline
pipeline.type = "kubernetes"

// return modified pipeline
pipeline;

You can paste the above snippet into runkit to test it out and see how it works. I also prepared an equivalent Go snippet that you can test in the go playground.

Also instead of programmatically manipulating yaml files across many repositories, perhaps you would be interested in our new template feature. You can define a single pipeline template (in yaml or in a programming language like starlark) and then re-use the template across all your repositories. To learn more see https://harness.io/blog/drone-configuration-templates/.