Browse Source

update docs

pull/78/head
Chris Mague 6 years ago
parent
commit
91edcd0c27
  1. 13
      DOCS.md
  2. 4
      plugin.go

13
DOCS.md

@ -183,6 +183,13 @@ pipeline:
```
# Environment variables
- PEM_NAME
If this environment variable is set, a file called ~/.ssh/<PEM_NAME> will be created
- PEM_CONTENTS
If this environment variable is set, the contents will be put in ~/.ssh/<PEM_NAME>
Please be sure to include the "-----BEGIN RSA PRIVATE KEY-----" and end lines for a valid key
- GITHUB_PRIVATE_SSH_KEY
If this environment variable is set, ~/.ssh/id_rsa will be set.
Please be sure to include the "-----BEGIN RSA PRIVATE KEY-----" and end lines for a valid key
@ -235,3 +242,9 @@ root_dir
parallelism
: The number of concurrent operations as Terraform walks its graph.
# Testing Locally
```
docker run -e PEM_NAME=my.pem -w /root/test -v `pwd`:/root quay.io/agari/agari-drone-terraform
```

4
plugin.go

@ -61,6 +61,7 @@ func (p Plugin) Exec() error {
// Install a extra PEM key if required
if len(os.Getenv("PEM_NAME")) > 0 {
fmt.Println("--- Setting a pem file")
value, exists := os.LookupEnv("PEM_CONTENTS")
if !exists {
value = "-----BEGIN RSA PRIVATE KEY-----\n\n-----END RSA PRIVATE KEY-----\n"
@ -72,9 +73,9 @@ func (p Plugin) Exec() error {
}
}
// Install a Github SSH key
if len(os.Getenv("GITHUB_PRIVATE_SSH_KEY")) > 0 {
fmt.Println("--- Setting a Github key")
sshconfErr := installGithubSsh(os.Getenv("GITHUB_PRIVATE_SSH_KEY"))
if sshconfErr != nil {
@ -83,6 +84,7 @@ func (p Plugin) Exec() error {
}
// Install an AWS profile if env var is set
fmt.Println("--- Setting an AWS profile")
if len(os.Getenv("AWS_ACCESS_KEY_ID")) > 0 {
profileErr := installProfile(os.Getenv("AWS_PROFILE"), os.Getenv("AWS_ACCESS_KEY_ID"), os.Getenv("AWS_SECRET_ACCESS_KEY"))

Loading…
Cancel
Save