drone-plugins / drone-downstream

Drone plugin to trigger downstream repositories to build
http://plugins.drone.io/drone-plugins/drone-downstream
Apache License 2.0
31 stars 42 forks source link

[proposal] trigger downstream with several key/value #29

Open ozbillwang opened 7 years ago

ozbillwang commented 7 years ago

For my understanding, trigger drone-downstream is to run a similar drone build start command via api.

Which I need:

1) Extra feature to trigger with several --param key=value. These key/values can be generated from preview steps in same .drone.yml 2) Support drone deploy as well (#25), because both drone build and drone deploy supports --param key=value and I do need to trigger downsteam with drone deploy directly.

My questions are, why not use a drone-cli container to do the job directly via shell scripting, more than write a seperate Go plugin as this repo? It will support any new future features automatically from new version of drone cli drone build/deploy

So:

1) Can Drone team lead to build drone-cli as official image when new version released? It will be better to make the old versions available as well.

2) Rewrite this plugin (or create a new one) to accept key/value and support deploy as well

New plugin usage will be similar as below:

notify:
  downstream:
    image: plugins/downstream
    server: https://ci.example.com
    type: [build|deploy]
    param: 
      key1: ${varialbe1}
      key2: ${varialbe2}
    repositories:
      - octocat/Hello-World@develop

I am happy to work on this, but the thing to stop me is, how to transfer variables from preview step to this plugin (varialbe1 and varialbe2)?

MOZGIII commented 7 years ago

Save them as .env file on the previous step and add support for loading any .env file before execution?

MOZGIII commented 7 years ago

Btw, slack plugins needs something like this: I need to do much more detailed configuration of messages, but can't transfer data from prevoius steps