Fix folder creation
This commit is contained in:
parent
ea58b30827
commit
b373644748
@ -151,7 +151,8 @@ func main() {
|
||||
pluginConfig := getPluginConfig(sugar)
|
||||
|
||||
if pluginConfig.privateKey != nil {
|
||||
runCommand(sugar, "mkdir", "/root/.ssh")
|
||||
sugar.Info("🔑 Adding ssh key to .ssh/id_ed25519")
|
||||
os.MkdirAll("/root/.ssh", 0700)
|
||||
err := os.WriteFile("/root/.ssh/id_ed25519", []byte(*pluginConfig.privateKey), 0400)
|
||||
if err != nil {
|
||||
sugar.Fatal(err)
|
||||
@ -162,6 +163,7 @@ func main() {
|
||||
|
||||
if pluginConfig.vaultToken != nil {
|
||||
sugar.Info("💼 Adding vault token to 'credentials/ci_vault_token'")
|
||||
os.MkdirAll("credentials", 0755)
|
||||
runCommand(sugar, "mkdir", "credentials")
|
||||
err := os.WriteFile("credentials/ci_vault_token", []byte(*pluginConfig.vaultToken), 0644)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user