Skip to content

Commit

Permalink
hailmary: deploy ssh key by hand
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-helmich committed Feb 20, 2024
1 parent c9db0c4 commit e48b829
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 2 additions & 1 deletion providers/mittwald.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ auth_command:
mw context set --installation-id "${MITTWALD_APP_INSTALLATION_ID}"
mw context set --project-id "$(mw app get -ojson | jq -r '.projectId')"
ssh-add -l
ssh-add -l || true
mw app ssh --test
db_pull_command:
Expand All @@ -40,6 +40,7 @@ files_import_command:
set -e -o pipefail
set -x
ssh-add -l
mw app download --target "${DDEV_FILES_DIR}"
# push is a dangerous command. If not absolutely needed it's better to delete these lines.
Expand Down
12 changes: 5 additions & 7 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,14 @@ teardown() {
ddev get ${DIR}
ddev restart

echo "${MITTWALD_SSH_PRIVATE_KEY}" | docker exec -i ddev-ssh-agent ssh-add -

run docker exec ddev-ssh-agent ssh-add -l
echo $output
#echo "${MITTWALD_SSH_PRIVATE_KEY}" | docker exec -i ddev-ssh-agent ssh-add -

ddev exec 'mkdir -p $HOME/.ssh'
echo "${MITTWALD_SSH_PRIVATE_KEY}" | ddev exec --raw -- bash -c 'cat > $HOME/.ssh/id_rsa'

echo "# ddev pull with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
ddev pull mittwald >&3

run ddev pull mittwald >&3
echo $output

health_checks
}

Expand Down

0 comments on commit e48b829

Please sign in to comment.