diff --git a/.buildkite/scripts/build.sh b/.buildkite/scripts/build.sh index 831e7684606e..d3cf3171599a 100755 --- a/.buildkite/scripts/build.sh +++ b/.buildkite/scripts/build.sh @@ -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 \ diff --git a/.buildkite/scripts/build_pr.sh b/.buildkite/scripts/build_pr.sh index 39cdd321c338..3aa9159e5bae 100755 --- a/.buildkite/scripts/build_pr.sh +++ b/.buildkite/scripts/build_pr.sh @@ -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" diff --git a/.buildkite/scripts/clean_preview_branches.sh b/.buildkite/scripts/clean_preview_branches.sh index 0255e2dc981f..aa41997a8a24 100755 --- a/.buildkite/scripts/clean_preview_branches.sh +++ b/.buildkite/scripts/clean_preview_branches.sh @@ -4,6 +4,12 @@ set -eo pipefail export REPO=git@github.com: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 &&