-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove deploy key usage and instead use temporary SSH key
- Loading branch information
saville
committed
Oct 17, 2024
1 parent
b76ce0f
commit 1b4c6f9
Showing
5 changed files
with
63 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# Please note that for the SSH unit tests to pass on a local machine, the private key needs to be placed in ~/.ssh/buildrunner-deploy-id_rsa | ||
# Look in the .github/workflows/build.yaml file for the SSH private key | ||
use-legacy-builder: False | ||
steps: | ||
clone: | ||
|
@@ -8,12 +6,20 @@ steps: | |
FROM {{ DOCKER_REGISTRY }}/rockylinux:8.5 | ||
RUN yum install -y git-core openssh-clients && yum clean all | ||
run: | ||
ssh-keys: ['buildrunner-deploy'] | ||
# This key is generated automatically by the test runner | ||
ssh-keys: ['buildrunner-test-ssh'] | ||
services: | ||
ssh-service: | ||
image: {{ DOCKER_REGISTRY }}/linuxserver/openssh-server:latest | ||
wait_for: | ||
- 2222 | ||
env: | ||
# This is set in the test_buildrunner_files.py file | ||
PUBLIC_KEY: "{{ BUILDRUNNER_TEST_SSH_PUB_KEY }}" | ||
LOG_STDOUT: "true" | ||
cmds: | ||
- mkdir ~/.ssh | ||
- ssh-keyscan github.com > ~/.ssh/known_hosts | ||
- ssh-keyscan -p 2222 ssh-service > ~/.ssh/known_hosts | ||
- chmod 700 ~/.ssh | ||
- chmod 600 ~/.ssh/known_hosts | ||
# Clone into temp directory since the "buildrunner" directory may already exist | ||
- rm -rf /tmp/test-clone | ||
- git clone [email protected]:adobe/buildrunner.git /tmp/test-clone | ||
- if [ "$(ssh -p 2222 linuxserver.io@ssh-service 'whoami')" != "linuxserver.io" ]; then exit 1; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
# Please note that for the SSH unit tests to pass on a local machine, the private key needs to be placed in ~/.ssh/buildrunner-deploy-id_rsa. | ||
# Look in the .github/workflows/build.yaml file for the SSH private key. | ||
steps: | ||
clone: | ||
ssh-test: | ||
build: | ||
dockerfile: | | ||
FROM {{ DOCKER_REGISTRY }}/rockylinux:8.5 | ||
RUN yum install -y git-core openssh-clients && yum clean all | ||
run: | ||
ssh-keys: ['buildrunner-deploy'] | ||
# This key is generated automatically by the test runner | ||
ssh-keys: ['buildrunner-test-ssh'] | ||
services: | ||
ssh-service: | ||
image: {{ DOCKER_REGISTRY }}/linuxserver/openssh-server:latest | ||
wait_for: | ||
- 2222 | ||
env: | ||
# This is set in the test_buildrunner_files.py file | ||
PUBLIC_KEY: "{{ BUILDRUNNER_TEST_SSH_PUB_KEY }}" | ||
LOG_STDOUT: "true" | ||
cmds: | ||
- mkdir ~/.ssh | ||
- ssh-keyscan github.com > ~/.ssh/known_hosts | ||
- ssh-keyscan -p 2222 ssh-service > ~/.ssh/known_hosts | ||
- chmod 700 ~/.ssh | ||
- chmod 600 ~/.ssh/known_hosts | ||
# Clone into temp directory since the "buildrunner" directory may already exist | ||
- rm -rf /tmp/test-clone | ||
- git clone [email protected]:adobe/buildrunner.git /tmp/test-clone | ||
- if [ "$(ssh -p 2222 linuxserver.io@ssh-service 'whoami')" != "linuxserver.io" ]; then exit 1; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters