I want to override the default shell used by the steps in my kubernetes pipeline but it looks like it is being ignored. I am using a debian image which uses dash
but I want Drone to use the bash
shell instead. I found the shell setting in the Step struct: https://github.com/drone-runners/drone-runner-kube/blob/0ea12962e3dcfd6e7573d0c774740b4186388df9/engine/resource/pipeline.go#L135 . but it doesn’t look like that is set in the pod definition for kubernetes.
For Linux builds, Drone always uses sh
when executing commands. If you need different behavior, instead of using the commands section, you can drop down to a lower level and set the entrypoint and command, which will respect the default SHELL.
steps:
- name: foo
image: bar
- commands:
- - echo hello world
+ entrypoint:
+ - /bin/bash
+ command:
+ - -c
+ - echo hello world