Added env-file with godotenv to all non-base implementations of plugin

This commit is contained in:
Robert Stettner 2020-08-05 16:28:21 +01:00
parent d913d6e7dc
commit a5076e74dc
4 changed files with 28 additions and 0 deletions

View File

@ -5,9 +5,16 @@ import (
"os"
"os/exec"
"strings"
"github.com/joho/godotenv"
)
func main() {
// Load env-file if it exists first
if env := os.Getenv("PLUGIN_ENV_FILE"); env != "" {
godotenv.Load(env)
}
var (
repo = getenv("PLUGIN_REPO")
registry = getenv("PLUGIN_REGISTRY")

View File

@ -10,6 +10,8 @@ import (
"strconv"
"strings"
"github.com/joho/godotenv"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
@ -20,6 +22,11 @@ import (
const defaultRegion = "us-east-1"
func main() {
// Load env-file if it exists first
if env := os.Getenv("PLUGIN_ENV_FILE"); env != "" {
godotenv.Load(env)
}
var (
repo = getenv("PLUGIN_REPO")
registry = getenv("PLUGIN_REGISTRY")

View File

@ -6,12 +6,19 @@ import (
"os/exec"
"path"
"strings"
"github.com/joho/godotenv"
)
// gcr default username
const username = "_json_key"
func main() {
// Load env-file if it exists first
if env := os.Getenv("PLUGIN_ENV_FILE"); env != "" {
godotenv.Load(env)
}
var (
repo = getenv("PLUGIN_REPO")
registry = getenv("PLUGIN_REGISTRY")

View File

@ -4,9 +4,16 @@ import (
"os"
"os/exec"
"path"
"github.com/joho/godotenv"
)
func main() {
// Load env-file if it exists first
if env := os.Getenv("PLUGIN_ENV_FILE"); env != "" {
godotenv.Load(env)
}
var (
registry = "registry.heroku.com"
process = getenv("PLUGIN_PROCESS_TYPE")