Skip to content

Commit

Permalink
travis-ci: provide an index of artifacts to people can find things.
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Getz <[email protected]>
  • Loading branch information
rgetz committed Jun 15, 2020
1 parent f03e9ad commit d32fc58
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions CI/travis/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,26 @@ sftp_upload() {
local TO="$2"
local LATE="$3"

sftp_cmd_pipe <<-EOF
cd ${DEPLOY_TO}
if [ -n "${LATE}" ] ; then
sftp_cmd_pipe <<-EOF
cd ${DEPLOY_TO}
put ${FROM} ${TO}
ls -l ${TO}
put ${FROM} ${TO}
ls -l ${TO}
symlink ${TO} ${LATE}
ls -l ${LATE}
bye
EOF
symlink ${TO} ${LATE}
ls -l ${LATE}
bye
EOF
else
sftp_cmd_pipe <<-EOF
cd ${DEPLOY_TO}
put ${FROM} ${TO}
ls -l ${TO}
bye
EOF
fi
}

upload_file_to_swdownloads() {
Expand Down Expand Up @@ -307,6 +317,12 @@ upload_file_to_swdownloads() {
"rm ${DEPLOY_TO}/${files}" || \
return 1
done
# provide an index so people can find files.
ssh "${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"
sftp_upload "${LIBNAME}_index.html" "${LIBNAME}_index.html"
fi

return 0
Expand Down

0 comments on commit d32fc58

Please sign in to comment.