https://github.com/rssnyder/drone-harness-secret
create/update a harness secret
https://github.com/rssnyder/drone-harness-secret
Last synced: about 1 month ago
JSON representation
create/update a harness secret
- Host: GitHub
- URL: https://github.com/rssnyder/drone-harness-secret
- Owner: rssnyder
- License: other
- Created: 2023-02-06T19:41:58.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-06T23:10:32.000Z (over 3 years ago)
- Last Synced: 2025-01-28T12:39:45.206Z (over 1 year ago)
- Language: Go
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
A plugin to .
# Usage
The following settings changes this plugin's behavior.
* NAME the name of the secret
* VALUE the content of the secret
* SECRET_MANAGER (optional) the secrets manager to use
For authentication and scope, use the following environment variables:
- HARNESS_PLATFORM_API_KEY: harness nextgen api key
- HARNESS_ACCOUNT_ID: harness account id
- HARNESS_PLATFORM_ORGANIZATION: organization id
- HARNESS_PLATFORM_PROJECT: project id
Below is an example `.drone.yml` that uses this plugin.
```yaml
kind: pipeline
name: default
steps:
- name: run rssnyder/drone-harness-secret plugin
image: rssnyder/drone-harness-secret
pull: if-not-exists
settings:
NAME: API_KEY
VALUE: sdflsdjf03239hwip2du
```
# Building
Build the plugin binary:
```text
scripts/build.sh
```
Build the plugin image:
```text
docker build -t rssnyder/drone-harness-secret -f docker/Dockerfile .
```
# Testing
Execute the plugin from your current working directory:
```text
docker run --rm -e PLUGIN_PARAM1=foo -e PLUGIN_PARAM2=bar \
-e DRONE_COMMIT_SHA=8f51ad7884c5eb69c11d260a31da7a745e6b78e2 \
-e DRONE_COMMIT_BRANCH=master \
-e DRONE_BUILD_NUMBER=43 \
-e DRONE_BUILD_STATUS=success \
-w /drone/src \
-v $(pwd):/drone/src \
rssnyder/drone-harness-secret
```