Skip to content

Instantly share code, notes, and snippets.

@phildionne
Created August 28, 2019 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phildionne/790d90a390c7d345bba71c20f56c0026 to your computer and use it in GitHub Desktop.
Save phildionne/790d90a390c7d345bba71c20f56c0026 to your computer and use it in GitHub Desktop.
---
kind: pipeline
name: default
steps:
- name: test
image: ruby:2.6.3-alpine
commands:
- echo $FOO
- echo $BAR
environment:
FOO:
from_secret: foo
BAR: bar
---
kind: secret
name: foo
data: EUgsPFbn0xyNdsxKtbB6nwR2w7RdG1pzo299qmI4zQ==
...
@phildionne
Copy link
Author

phildionne commented Aug 28, 2019

Given:

drone encrypt your/repository foo
EUgsPFbn0xyNdsxKtbB6nwR2w7RdG1pzo299qmI4zQ==

Running:

$ drone exec .drone.yml

Result:

[test:0] + echo $FOO
[test:1]
[test:2] + echo $BAR
[test:3] bar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment