Skip to content

Commit

Permalink
Add sskPrivateKey option for test setup
Browse files Browse the repository at this point in the history
This addresses the use of the preTest hook in the docker provider.
  • Loading branch information
danielrbradley committed Jul 12, 2024
1 parent 4beba4e commit ea2b0d9
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ publish:
# 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
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ jobs:
- name: Login to Google Cloud Registry
run: gcloud --quiet auth configure-docker
#{{- end }}#
#{{- if .Config.sshPrivateKey }}#
- name: Setup SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: #{{ .Config.sshPrivateKey }}#
#{{- end }}#
#{{- if .Config.integrationTestProvider }}#
- name: Prepare upstream code
run: make upstream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ jobs:
- name: Login to Google Cloud Registry
run: gcloud --quiet auth configure-docker
#{{- end }}#
#{{- if .Config.sshPrivateKey }}#
- name: Setup SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: #{{ .Config.sshPrivateKey }}#
#{{- end }}#
#{{- if .Config.integrationTestProvider }}#
- name: Prepare upstream code
run: make upstream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ jobs:
- name: Login to Google Cloud Registry
run: gcloud --quiet auth configure-docker
#{{- end }}#
#{{- if .Config.sshPrivateKey }}#
- name: Setup SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: #{{ .Config.sshPrivateKey }}#
#{{- end }}#
#{{- if .Config.integrationTestProvider }}#
- name: Prepare upstream code
run: make upstream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ jobs:
- name: Login to Google Cloud Registry
run: gcloud --quiet auth configure-docker
#{{- end }}#
#{{- if .Config.sshPrivateKey }}#
- name: Setup SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: #{{ .Config.sshPrivateKey }}#
#{{- end }}#
#{{- if .Config.integrationTestProvider }}#
- name: Prepare upstream code
run: make upstream
Expand Down

0 comments on commit ea2b0d9

Please sign in to comment.