Skip to content

Drone environment plugin to export signed build and repository information

License

Notifications You must be signed in to change notification settings

sloonz/drone-env-signed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An environment variable plugin that sign repository and build information and export it a as JWS token.

Please note this project requires Drone server version 1.7 or higher.

Usage

First, generate a signing key :

DRONE_PRIVATE_KEY="$(openssl genpkey -algorithm ed25519 -outform PEM)"

Download and run the plugin:

$ docker run -d \
  --publish=3000:80 \
  --env=DRONE_DEBUG=true \
  --env=DRONE_SECRET=bea26a2221fd8090ea38720fc445eca6 \
  --env=DRONE_PRIVATE_KEY="$DRONE_PRIVATE_KEY" \
  --restart=always \
  --name=drone-env-signed

Update your runner configuration to include the plugin address and the shared secret.

DRONE_ENV_PLUGIN_ENDPOINT=http://drone-env-signed:3000
DRONE_ENV_PLUGIN_TOKEN=bea26a2221fd8090ea38720fc445eca6

Two environment variables will be added to your pipelines, DRONE_SIGNED_BUILD and DRONE_SIGNED_REPO. The JSON structure is defined here in the Repo and Build structures.

About

Drone environment plugin to export signed build and repository information

Resources

License

Stars

Watchers

Forks

Packages

No packages published