Skip to content

Commit

Permalink
Release support improvements (#908)
Browse files Browse the repository at this point in the history
* Make dos2unix available.

* Adding some additional logging.
  • Loading branch information
joel-rieke committed Jan 25, 2024
1 parent 135d8c0 commit d1b1c5c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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

0 comments on commit d1b1c5c

Please sign in to comment.