Conversion of .drone.yml from 0.8 to 1.0

Update: drone convert is what you should use as well, but I had an issue with that as it didn’t work with proper yaml anchors (it just removed the line).

Hi,

we are just switching to a new Drone 1.0 and to ease the migration, we created a very simple script which helped us to do at least the basic stuff automatically.

Here is the repo, PRs welcome, it definitely doesn’t work for all cases and you need to post-check it manually. But it worked for us with simple but not trivial pipelines.

Hey there, Drone 1.0 is able to read 0.8 yaml configuration files. It will detect and convert them on-the-fly. You can also use the drone convert command to manually convert configuration files. The automatic conversion is not perfect but it should work just fine for most projects. Sorry if we did a poor job communicating this :frowning:

1 Like

Heh! Hey, thanks for the answer! Will add it to the description and the github README. Writing that mini script took less than an hour, so no big harm.

I didn’t find this anywhere and actually, the automatic conversion didn’t work in our case.

But the drone convert works! Thanks a lot!

A note here: https://docs.drone.io/config/pipeline/migrating/ would be nice :smile:

Hi! I’m trying to use convert on a bitbucket-pipelines.yml, but I can’t find how to save the result.

drone convert bitbucket-pipelines.yml --save

The previous code sample just overwrites the file to:

---
kind: pipeline
name: default

platform:
  os: linux
  arch: amd64

...

The ... is the real end of the file.

I’m sorry, but I couldn’t find instructions on docs.

Thank you!

Hi @sobral Drone only saves the log output from each pipeline step, which is stored in the database
Drone doesn’t have native support for saving files or artifacts

Thank you.

I’m sorry. I need to explain myself better. I want to convert a bitbucket-pipelines.yml to .drone.yml, but it doesn’t work. The process doesn’t complete. I did it by hand, so, but I would like to know how to do it using drone convert.

Thank you for your attention.

@sobral you are referring the right doc. Can you share some screenshot for this? :point_right: “process didn’t complete”.

Thanks!

Did you get the issue resolved? I am having the same issue where if I just use a default example given in the blog below, I can able to convert bitbucket-pipelines.yml just fine but when I introduce branches, it’s kind of stuck and doesn’t complete.