Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release support improvements #908

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Install packages
sudo apt-get update -y
sudo apt-get install -y curl unzip
sudo apt-get install -y curl unzip dos2unix
sudo apt-get install -y coreutils
sudo apt-get install -y docker.io
sudo apt-get install -y openjdk-11-jre-headless
Expand Down
8 changes: 7 additions & 1 deletion pkg/utils/vaultUtil.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package utils

import (
"errors"
"fmt"
"log"
"os"
Expand All @@ -15,14 +16,19 @@ import (
// Helper to easiliy intialize a vault and a mod all at once.
func InitVaultMod(config *DriverConfig) (*DriverConfig, *helperkv.Modifier, *sys.Vault, error) {
LogInfo(config, "InitVaultMod begins..")
if config == nil {
LogInfo(config, "InitVaultMod failure. config provided is nil")
return config, nil, nil, errors.New("invalid nil config")
}

vault, err := sys.NewVault(config.Insecure, config.VaultAddress, config.Env, false, false, false, config.Log)
if err != nil {
LogInfo(config, "Failure to connect to vault..")
LogErrorObject(config, err, false)
return config, nil, nil, err
}
vault.SetToken(config.Token)

LogInfo(config, "InitVaultMod - Initializing Modifier")
mod, err := helperkv.NewModifier(config.Insecure, config.Token, config.VaultAddress, config.Env, config.Regions, false, config.Log)
if err != nil {
LogErrorObject(config, err, false)
Expand Down
Loading