Some of the Drone plugins require specific secrets for integration with external services
Having the ability to extend the drone cmd client with sub commands through plugins would significantly improve end user experience setting up drone plugins
For example, the drone-helm plugin requires API_SERVER and KUBERNETES_TOKEN secrets with a prefix by stage.
a sample client side plugin could fetch these using a Kubernetes configuration file:
drone helm setup --repository octocat/hello-world --context STAGING=staging.cluster.com --context PROD=prod.cluster.com
which would:
-
fetch from kubeconfig and use kubectl to get drone service account
-
run following commands:
drone secret add --repository octocat/hello-world --name STAGING_API_SERVER --value <staging_endpoint> drone secret add --repository octocat/hello-world --name STAGING_KUBERNETES_TOKEN --value <staging_oken> drone secret add --repository octocat/hello-world --name PROD_API_SERVER --value <prod_endpoint> drone secret add --repository octocat/hello-world --name PROD_KUBERNETES_TOKEN --value <prod_token>