- name: print-vars image: ubuntu pull: if-not-exists commands: - 'env | grep "^DRONE.*" | sort' - 'env | grep "^PLUGIN.*" | sort' settings: foo: - a,b - c
results from drone exec
[print-vars:0] + env | grep "^DRONE.*" | sort [print-vars:1] DRONE_BUILD_FINISHED=1593081581 [print-vars:2] DRONE_BUILD_STARTED=1593081581 [print-vars:3] DRONE_BUILD_STATUS=success [print-vars:4] DRONE_JOB_FINISHED=1593081581 [print-vars:5] DRONE_JOB_STARTED=1593081581 [print-vars:6] DRONE_JOB_STATUS=success [print-vars:7] DRONE_WORKSPACE=/drone/src [print-vars:8] DRONE_WORKSPACE_BASE=/drone/src [print-vars:9] DRONE_WORKSPACE_PATH= [print-vars:10] + env | grep "^PLUGIN.*" | sort [print-vars:11] PLUGIN_FOO=a,b,c
Since thee doenst seem to be any escaping mechanism for , (?) of the commas are escaped there is no way to parse the lines inside a plugin in a way that preserves commas.
This is tedious to work around because every setting of every plugin that needs this has to be converted away from urfave/cli (because it does not support user defined flag types that integrate properly with it due to it requiering package private access) and then create a custom flag type that either has support for escaping , or replace with a custom separator that is replaced by the custom flag type.
I am up to maintaining 4 different plugin forks now for clients and is currently converting the fifth one because drone plugins dictates that the inflexible cli package is to be used and
, are actually required and there is AFAIK no way around it.