Skip to content

Commit

Permalink
Remove unused sshPrivateKey config (#1176)
Browse files Browse the repository at this point in the history
Only the Docker provider uses the `webfactory/ssh-agent` action, and
that's configured via
[`preTest`](https://github.com/pulumi/pulumi-docker/blob/master/.ci-mgmt.yaml#L35-L39)
instead of the special-purpose `sshPrivateKey` option.

Nothing else
[appears](https://github.com/search?q=org%3Apulumi%20path%3A.ci-mgmt.yml%20sshPrivateKey&type=code)
to use this, so we can remove it.
  • Loading branch information
blampe authored Dec 9, 2024
1 parent b7f0e10 commit 49c955f
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 41 deletions.
6 changes: 0 additions & 6 deletions provider-ci/internal/pkg/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,6 @@ type Config struct {
// https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22docker%3A%22&type=code
Docker bool `yaml:"docker"`

// SSHPrivateKey sets up SSH with specified private key before running
// tests in CI job. This should be provided from a secret. Used by the
// docker provider only:
// https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22sshPrivateKey%3A%22&type=code
SSHPrivateKey string `yaml:"sshPrivateKey"`

// GCP authenticates with GCP before running tests in CI job. Used in gcp
// and docker:
// https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22gcp%3A%22&type=code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,6 @@ jobs:
- name: Login to Google Cloud Registry
run: gcloud --quiet auth configure-docker
#{{- end }}#
#{{- if .Config.SSHPrivateKey }}#
- name: Setup SSH key
uses: webfactory/ssh-agent@836c84ec59a0e7bc0eabc79988384eb567561ee2 # v0.7.0
with:
ssh-private-key: #{{ .Config.SSHPrivateKey }}#
#{{- end }}#
#{{- if index .Config.SetupScript }}#
- name: Run setup script
run: #{{ index .Config.SetupScript }}#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,6 @@ jobs:
- name: Login to Google Cloud Registry
run: gcloud --quiet auth configure-docker
#{{- end }}#
#{{- if .Config.SSHPrivateKey }}#
- name: Setup SSH key
uses: webfactory/ssh-agent@836c84ec59a0e7bc0eabc79988384eb567561ee2 # v0.7.0
with:
ssh-private-key: #{{ .Config.SSHPrivateKey }}#
#{{- end }}#
#{{- if index .Config.SetupScript }}#
- name: Run setup script
run: #{{ index .Config.SetupScript }}#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,6 @@ jobs:
- name: Login to Google Cloud Registry
run: gcloud --quiet auth configure-docker
#{{- end }}#
#{{- if .Config.SSHPrivateKey }}#
- name: Setup SSH key
uses: webfactory/ssh-agent@836c84ec59a0e7bc0eabc79988384eb567561ee2 # v0.7.0
with:
ssh-private-key: #{{ .Config.SSHPrivateKey }}#
#{{- end }}#
#{{- if index .Config.SetupScript }}#
- name: Run setup script
run: #{{ index .Config.SetupScript }}#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,6 @@ jobs:
- name: Login to Google Cloud Registry
run: gcloud --quiet auth configure-docker
#{{- end }}#
#{{- if .Config.SSHPrivateKey }}#
- name: Setup SSH key
uses: webfactory/ssh-agent@836c84ec59a0e7bc0eabc79988384eb567561ee2 # v0.7.0
with:
ssh-private-key: #{{ .Config.SSHPrivateKey }}#
#{{- end }}#
#{{- if index .Config.SetupScript }}#
- name: Run setup script
run: #{{ index .Config.SetupScript }}#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,6 @@ jobs:
- name: Login to Google Cloud Registry
run: gcloud --quiet auth configure-docker
#{{- end }}#
#{{- if .Config.SSHPrivateKey }}#
- name: Setup SSH key
uses: webfactory/ssh-agent@836c84ec59a0e7bc0eabc79988384eb567561ee2 # v0.7.0
with:
ssh-private-key: #{{ .Config.SSHPrivateKey }}#
#{{- end }}#
#{{- if index .Config.SetupScript }}#
- name: Run setup script
run: #{{ index .Config.SetupScript }}#
Expand Down
5 changes: 0 additions & 5 deletions provider-ci/internal/pkg/templates/defaults.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,6 @@ checkUpstreamUpgrade: true
# Used in 9 providers: https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22docker%3A%22&type=code
#docker: false

# Setup SSH with specified private key before running tests in CI job.
# This should be provided from a secret
# Used by the docker provider only: https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22sshPrivateKey%3A%22&type=code
#sshPrivateKey: ${{ secrets.PRIVATE_SSH_KEY_FOR_DIGITALOCEAN }}

# Authenticate with GCP before running tests in CI job
# Used in gcp and docker: https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22gcp%3A%22&type=code
#gcp: false
Expand Down

0 comments on commit 49c955f

Please sign in to comment.