Skip to content

Commit

Permalink
travis-ci: avoid errors when uploading things to akami
Browse files Browse the repository at this point in the history
I don't know who maintains this infrastructure - but they don't use the
same keys on all their mirrors, so we need to use -o "StrictHostKeyChecking no"
which defeats the purpose of secure anything.

But this will avoid errors when pushing things up.

Since this is only pushing things up, not pulling things down - this is
not risky.

Signed-off-by: Robin Getz <[email protected]>
  • Loading branch information
rgetz committed Jun 15, 2020
1 parent d32fc58 commit f9abc28
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CI/travis/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ brew_install_if_not_exists() {
}

sftp_cmd_pipe() {
sftp "${EXTRA_SSH}" "${SSHUSER}@${SSHHOST}"
sftp -o "StrictHostKeyChecking no" "${EXTRA_SSH}" "${SSHUSER}@${SSHHOST}"
}

sftp_rm_artifact() {
Expand Down Expand Up @@ -310,15 +310,15 @@ upload_file_to_swdownloads() {
# limit things to a few files, so things don't grow forever
# we only do this on one build so simultaneous builds don't clobber each other
if [ -n "${GH_DOC_TOKEN}" ] ; then
for files in $(ssh "${EXTRA_SSH}" "${SSHUSER}@${SSHHOST}" \
for files in $(ssh -o "StrictHostKeyChecking no" "${EXTRA_SSH}" "${SSHUSER}@${SSHHOST}" \
"ls -lt ${GLOB}" | tail -n +100 | awk '{print $NF}')
do
ssh "${EXTRA_SSH}" "${SSHUSER}@${SSHHOST}" \
ssh -o "StrictHostKeyChecking no" "${EXTRA_SSH}" "${SSHUSER}@${SSHHOST}" \
"rm ${DEPLOY_TO}/${files}" || \
return 1
done
# provide an index so people can find files.
ssh "${EXTRA_SSH}" "${SSHUSER}@${SSHHOST}" \
ssh -o "StrictHostKeyChecking no" "${EXTRA_SSH}" "${SSHUSER}@${SSHHOST}" \
"ls -lt ${DEPLOY_TO}" | grep ${LIBNAME} > ${LIBNAME}_index.html
sftp_rm_artifact "${LIBNAME}_index.html" || \
echo_blue "Could not delete ${LIBNAME}_index.html"
Expand Down

0 comments on commit f9abc28

Please sign in to comment.