From 49c955f249049d3054bc06088c03e653d3202160 Mon Sep 17 00:00:00 2001 From: Bryce Lampe Date: Mon, 9 Dec 2024 00:53:11 -0800 Subject: [PATCH] Remove unused sshPrivateKey config (#1176) 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. --- provider-ci/internal/pkg/config.go | 6 ------ .../templates/bridged-provider/.github/workflows/main.yml | 6 ------ .../bridged-provider/.github/workflows/nightly-test.yml | 6 ------ .../bridged-provider/.github/workflows/prerelease.yml | 6 ------ .../bridged-provider/.github/workflows/release.yml | 6 ------ .../.github/workflows/run-acceptance-tests.yml | 6 ------ provider-ci/internal/pkg/templates/defaults.config.yaml | 5 ----- 7 files changed, 41 deletions(-) diff --git a/provider-ci/internal/pkg/config.go b/provider-ci/internal/pkg/config.go index 4612c11684..fae84025a5 100644 --- a/provider-ci/internal/pkg/config.go +++ b/provider-ci/internal/pkg/config.go @@ -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 diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml index 3e7fd3ce68..c872ba9209 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml @@ -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 }}# diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml index 4b3536daa1..7a6e72ea6c 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml @@ -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 }}# diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml index 9fc5a55f2a..d439178d1a 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml @@ -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 }}# diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml index bcb169ce36..858e86a222 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml @@ -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 }}# diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml index 4a543aba6b..43abdace50 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml @@ -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 }}# diff --git a/provider-ci/internal/pkg/templates/defaults.config.yaml b/provider-ci/internal/pkg/templates/defaults.config.yaml index 0c79147a2c..9fb1bb0086 100644 --- a/provider-ci/internal/pkg/templates/defaults.config.yaml +++ b/provider-ci/internal/pkg/templates/defaults.config.yaml @@ -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