diff --git a/pkg/up/context.go b/pkg/up/context.go index a4c29055..bf90e743 100644 --- a/pkg/up/context.go +++ b/pkg/up/context.go @@ -6,13 +6,14 @@ import ( "strings" "github.com/AlecAivazis/survey/v2" + "github.com/samber/lo" + "github.com/pluralsh/plural-cli/pkg/bundle" "github.com/pluralsh/plural-cli/pkg/config" "github.com/pluralsh/plural-cli/pkg/manifest" "github.com/pluralsh/plural-cli/pkg/provider" "github.com/pluralsh/plural-cli/pkg/utils" "github.com/pluralsh/plural-cli/pkg/utils/git" - "github.com/samber/lo" "github.com/mitchellh/go-homedir" ) diff --git a/test/plural/lib/check-required.yml b/test/plural/lib/check-required.yml index da887de6..44613b1d 100644 --- a/test/plural/lib/check-required.yml +++ b/test/plural/lib/check-required.yml @@ -54,11 +54,6 @@ steps: assertions: - result.systemout ShouldMatchRegex '^Plural Home .+$' - - name: Git Repo Private Key - script: "echo Git Repo Private Key {{ .input.gitRepoPrivateKey }}" - assertions: - - result.systemout ShouldMatchRegex '^Git Repo Private Key .+$' - - name: Project script: "echo Project {{ .input.project }}" assertions: diff --git a/test/plural/lib/context-setup.yml b/test/plural/lib/context-setup.yml index 21e748fd..222ffd40 100644 --- a/test/plural/lib/context-setup.yml +++ b/test/plural/lib/context-setup.yml @@ -2,9 +2,10 @@ executor: context-setup input: directory: '' gitRepo: '' - gitRepoPrivateKey: '' + gitRepoPrivateKeyPath: '' steps: - script: | + PRIVATE_KEY=$(cat {{ .input.gitRepoPrivateKeyPath }} | sed 's/^/ /') ;\ cat << EOF > {{ .input.directory }}/context.yaml apiVersion: plural.sh/v1alpha1 kind: Context @@ -15,5 +16,6 @@ steps: configuration: console: repo_url: {{ .input.gitRepo }} - private_key: {{ .input.gitRepoPrivateKey | b64dec }} - + private_key: |- + $PRIVATE_KEY + EOF diff --git a/test/plural/up.yml b/test/plural/up.yml index 686c9b42..336cd008 100644 --- a/test/plural/up.yml +++ b/test/plural/up.yml @@ -19,8 +19,6 @@ vars: token: '' # Local plural home directory used to store plural files pluralHome: '' - # SSH key used to access git repository - gitRepoPrivateKey: '' # Provider-specific project name/id project: '' # Provider name: gcp, azure, aws @@ -48,7 +46,6 @@ vars: secrets: - pluralKey - token - - gitRepoPrivateKey - gcpSAKeyFile - gcpOrgID - gcpBillingID @@ -81,9 +78,6 @@ testcases: - name: Setup context file steps: - type: context-setup - directory: {{ .directory }} - gitRepo: {{ .gitRepo }} - gitRepoPrivateKey: {{ .gitRepoPrivateKey }} - name: Plural login steps: