I have switched a repo from using .drone.yml to using .drone.star
Previously there was .drone.starlark that locally generated .drone.yml which runs fine in CI.
I have:
That is not the most helpful error message. Any clues about what might be wrong?
yaml: did not find expected hexdecimal number
The Starlark file generates a yaml file. This error message, which comes from the go-yaml parsing library, indicates the generated yaml file cannot be parsed. If I had to guess, I would say that it is probably because a value needs to be quoted. Also keep in mind that if you change the path of your configuration file, it may cause problems for earlier commits or pull requests where no configuration exists at the new path.
Locally I can do:
drone starlark --source=.drone.star --repo.slug=user_ldap
And it generates exactly the .drone.yml that is currently running successfully in master. So starlark is able to execute the starlark code and generate YML that works on the drone server.
So, it seems that the local starlark and the starlark extension on the drone server are doing something a little different, or?
I guess I have to start cutting down parts of the starlark code until it works, then add back pieces to see what breaks it.