-
Notifications
You must be signed in to change notification settings - Fork 802
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testing WPCloud on a new test site for jetpackisbestpack.
- Loading branch information
Showing
1 changed file
with
8 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,42 +54,18 @@ jobs: | |
chmod -v 700 ~/.ssh | ||
touch ~/.ssh/id_site | ||
touch ~/.ssh/known_hosts | ||
chmod 600 ~/.ssh/id_site | ||
echo "$WPCLOUD_SSH_KEY" > ~/.ssh/id_site | ||
chmod 600 ~/.ssh/known_hosts | ||
echo "$SSH_KEY" > ~/.ssh/id_site | ||
echo "wrote ~/.ssh/id_site" | ||
touch ~/.ssh/askpass | ||
chmod -v 700 ~/.ssh/askpass | ||
cat >>~/.ssh/askpass <<END | ||
#!/bin/bash | ||
echo "\$WPCLOUD_SSH_KEY_PASSPHRASE" | ||
END | ||
echo "wrote ~/.ssh/askpass" | ||
cat >>~/.ssh/config <<END | ||
Host * | ||
StrictHostKeyChecking no | ||
END | ||
echo "wrote ~/.ssh/config" | ||
touch ~/.ssh/stdin | ||
chmod -v 600 ~/.ssh/stdin | ||
cat >>~/.ssh/stdin <<END | ||
$WPCLOUD_STDIN | ||
END | ||
echo "wrote ~/.ssh/stdin" | ||
export SSH_ASKPASS="$HOME/.ssh/askpass" | ||
echo "exported SSH_ASKPASS" | ||
export SSH_ASKPASS_REQUIRE="force" | ||
echo "exported SSH_ASKPASS_REQUIRE" | ||
export DISPLAY=":" | ||
echo "exported DISPLAY" | ||
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts | ||
echo "wrote ~/.ssh/known_hosts" | ||
echo "::endgroup::" | ||
echo "::group::execution" | ||
cat ~/.ssh/stdin | setsid ssh -i ~/.ssh/id_site -l "$WPCLOUD_SSH_USER" ssh.atomicsites.net "$WPCLOUD_SSH_COMMAND" || CODE=$? | ||
ssh -i ~/.ssh/id_site [email protected] "ls" || CODE=$? | ||
echo "::endgroup::" | ||
echo "::group::teardown" | ||
|
@@ -98,8 +74,5 @@ jobs: | |
echo "Exiting with exit code $CODE" | ||
exit $CODE | ||
env: | ||
WPCLOUD_SSH_KEY: ${{ secrets.WPCLOUD_SSH_KEY }} | ||
WPCLOUD_SSH_KEY_PASSPHRASE: ${{ secrets.WPCLOUD_SSH_KEY_PASSPHRASE }} | ||
WPCLOUD_SSH_USER: ${{ secrets.WPCLOUD_SSH_USER }} | ||
WPCLOUD_SSH_COMMAND: ${{ secrets.WPCLOUD_SSH_COMMAND }} | ||
WPCLOUD_STDIN: ${{ toJSON(github) }} | ||
SSH_KEY: ${{ secrets.UPDATEJETPACKSTAGING_SSH_KEY }} | ||
SSH_KNOWN_HOSTS: ${{ secrets.UPDATEJETPACKSTAGING_SSH_KNOWN_HOSTS }} |