I have been using starlark more to make managing the .drone.yml a bit simpler. But from version 1.3.1 and onwards of the drone cli the conversion broke, everything works with version 1.3.0.
The issue is only one pipeline gets written to the .drone.yml file when doing drone starlark
.
I’ve tested with the following example provided in the docs, which is also broken:
def main(ctx):
return [
step("amd64"),
step("arm64"),
]
def step(arch):
return {
"kind": "pipeline",
"name": "build-%s" % arch,
"steps": [
{
"name": "build",
"image": "alpine",
"commands": [
"echo hello world"
]
}
]
}
It creates the following .drone.yml:
kind: pipeline
name: build-amd64
steps:
- commands:
- echo hello world
image: alpine
name: build
And here is a link to one of my repos with a starlark file that creates a broken yaml file when converted with drone cli 1.3.1 and above: https://github.com/mwalbeck/docker-composer