Service_account_name ignored when converting from jsonnet

Hey, I’m trying to convert .drone.jsonnet into .drone.yml and everything works fine, except service_account_name property that is being skipped.

My pipeline looks like the following, and I need service account name for kubernetes runner in EKS. I guess this property might not be well supported, I found out about it by inspecting code in

    kind: 'pipeline',
    type: 'kubernetes',
    name: 'deploy',
    service_account_name: 'deploy-account-name',
    steps: [...]

Is there a way to somehow fix it or some work around?
I guess it’s less of an issue if this property is honoured when configuring drone to use jsonnet directly (by pointing builds to use .drone.jsonnet). I haven’t tried it yet, as I’m in the process of transitioning from yml to jsonnet and I’m just manually converting to .drone.yml for now.


you can disable formatting (this outputs json, but remember that yaml is a superset of json and therefore json is valid yaml syntax)

drone jsonnet --format=false

or you can use the jsonnet binary instead of the drone binary:

jsonnet .drone.yml


How will it work when I switch my builds to use jsonnet directly? Will this property be picked up the builds?

yes, the built-in jsonnet converter does not auto-format which is the reason this field is dropped (because the formatter is for docker-pipelines only, and docker pipelines do not have the service_account_name field).