https://github.com/drone/drone-secret-plugin
Secrets extension for backward compatibility with 0.8 global secrets files.
https://github.com/drone/drone-secret-plugin
Last synced: 6 months ago
JSON representation
Secrets extension for backward compatibility with 0.8 global secrets files.
- Host: GitHub
- URL: https://github.com/drone/drone-secret-plugin
- Owner: drone
- License: other
- Created: 2020-01-17T23:47:12.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-07T16:34:44.000Z (about 5 years ago)
- Last Synced: 2024-06-19T13:40:36.595Z (about 2 years ago)
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
This extension provides global secrets for use in your pipelines. This extension is a direct port of the global secret file in Drone 0.8. _Please note this project requires Drone server version 1.4 or higher._
## Secret File
Secrets are loaded from a yaml configuration file. Example secrets configuration file:
```text
- name: docker_username
value: octocat
- name: docker_password
value: correct-horse-battery-staple
repos: [ octocat/hello-world, github/* ]
events: [ push, tag ]
```
## Installation
Create a shared secret:
```console
$ openssl rand -hex 16
bea26a2221fd8090ea38720fc445eca6
```
Download and run the plugin:
```console
$ docker run -d \
--publish=3000:3000 \
--env=DRONE_DEBUG=true \
--env=DRONE_SECRET=bea26a2221fd8090ea38720fc445eca6 \
--env=DRONE_SECRET_FILE=/etc/secrets.yml \
--restart=always \
--volume=/etc/secrets.yml:/etc/secrets.yml \
--name=secrets drone/secret-plugin
```
Update your Drone __runner__ configuration to include the extension address and the shared secret.
```text
DRONE_SECRET_PLUGIN_ENDPOINT=http://1.2.3.4:3000
DRONE_SECRET_PLUGIN_SECRET=bea26a2221fd8090ea38720fc445eca6