A global secret and yml setting needed

Assuming you have many repositories to manage, a global secret maybe needed,

For example above,the secrets not only used in one repository,but for many ohters.for now,I need repeat setting secret for each one.

And a common step in drom.yml also needed,for example below notice step,will needed in all repositoreis,

  - name: notice
    image: lizheming/drone-wechat
    settings:
      corpid: 
        from_secret: wechat_corpid
      corp_secret:
        from_secret: wechat_corp_secret
      agent_id: 
        from_secret: wechat_corp_agent_id
      to_party: 2
      msg_url: ${DRONE_BUILD_LINK}
      safe: 0
      btn_txt: more
      title: "{%if success %}😊{% else %}😭{% endif %} #{{build.number}} {{repo.name}} staging"
      message: |
        Author: {{build.author}}
        Commit: ${DRONE_COMMIT:0:8}
        Message: ${DRONE_COMMIT_MESSAGE}
        {%if success %}
        πŸ’πŸ’πŸ’Build #{{build.number}} succeeded. Good job.
        {% else %}
        πŸ₯€πŸ₯€πŸ₯€Build #{{build.number}} failed. Fix me please.
        {% endif %}
    when:
      status: 
        - success
        - failure

can this be designed in a global setting?or any ohter suggestion

@vkiller ,

Could you please check drone secret plugin where you can have the secret and refer in your pipeline.

Let us know if this is what you are looking.

Regards,
Harness Support

drone supports organization secrets (which are global for all repositories in an organization)
https://docs.drone.io/secret/organization/

and drone supports secret plugins which allow you to define global secrets (e.g. from vault)
https://docs.drone.io/secret/external/

1 Like

@csgit @bradrydzewski That’s exactly what I want,thanks both