Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh key fix #2990

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .buildkite/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ fi
# The docs build can use the ssh agent's authentication socket
# but can't use ssh keys directly so we start an ssh-agent.

# Temporary workaround until we can move to HTTPS auth
vault read -field=private-key secret/ci/elastic-docs/elasticmachine-ssh-key > "$HOME/.ssh/id_rsa"
vault read -field=public-key secret/ci/elastic-docs/elasticmachine-ssh-key > "$HOME/.ssh/id_rsa.pub"
ssh-keyscan github.com >> "$HOME/.ssh/known_hosts"
chmod 600 "$HOME/.ssh/id_rsa"

ssh-agent bash -c "
ssh-add &&
./build_docs --all \
Expand Down
6 changes: 6 additions & 0 deletions .buildkite/scripts/build_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ build_cmd="./build_docs --all \
echo "The following build command will be used"
echo $build_cmd

# Temporary workaround until we can move to HTTPS auth
vault read -field=private-key secret/ci/elastic-docs/elasticmachine-ssh-key > "$HOME/.ssh/id_rsa"
vault read -field=public-key secret/ci/elastic-docs/elasticmachine-ssh-key > "$HOME/.ssh/id_rsa.pub"
ssh-keyscan github.com >> "$HOME/.ssh/known_hosts"
chmod 600 "$HOME/.ssh/id_rsa"

# Kick off the build
ssh-agent bash -c "ssh-add && $build_cmd"

Expand Down
6 changes: 6 additions & 0 deletions .buildkite/scripts/clean_preview_branches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ set -eo pipefail
export [email protected]:elastic/built-docs.git
export IMAGE=docker.elastic.co/docs/build:latest

# Temporary workaround until we can move to HTTPS auth
vault read -field=private-key secret/ci/elastic-docs/elasticmachine-ssh-key > "$HOME/.ssh/id_rsa"
vault read -field=public-key secret/ci/elastic-docs/elasticmachine-ssh-key > "$HOME/.ssh/id_rsa.pub"
ssh-keyscan github.com >> "$HOME/.ssh/known_hosts"
chmod 600 "$HOME/.ssh/id_rsa"

./build_docs --docker-build build
ssh-agent bash -c '
ssh-add &&
Expand Down