diff options
author | Dave Wallace <dwallacelf@gmail.com> | 2021-10-06 18:16:17 -0400 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2021-10-26 14:57:03 -0400 |
commit | 31635358ab5dca1434a82548ba9ae8235441f378 (patch) | |
tree | 9128f41b1f022da43b9efcc6534baa05152f2ecc /jjb/scripts/publish_docs.sh | |
parent | 75e26c58e134d450b19b983ab50b6926b13b120d (diff) |
Convert VPP docs upload destination from nexus to amazon S3.
- Don't build doxygen docs which is deprecated in master
and fails to upload in 21.xx releases
- Only build 'make test-docs' in 21.xx releases which is
deprecated in master (VPP 22.02)
Change-Id: I54c46b32f95705ee0868a961f18fed8b0d4bba81
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'jjb/scripts/publish_docs.sh')
-rwxr-xr-x[-rw-r--r--] | jjb/scripts/publish_docs.sh | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/jjb/scripts/publish_docs.sh b/jjb/scripts/publish_docs.sh index 86963b68a..841789d82 100644..100755 --- a/jjb/scripts/publish_docs.sh +++ b/jjb/scripts/publish_docs.sh @@ -17,6 +17,11 @@ echo "---> publish_docs.sh" set -exuo pipefail +if [[ "${SILO}" != "production" ]] ; then + echo "WARNING: Doc upload not supported on Jenkins '${SILO}'..." + exit 0 +fi + CDN_URL="s3-docs.fd.io" if [[ ${JOB_NAME} == *merge* ]]; then @@ -33,6 +38,24 @@ if [[ ${JOB_NAME} == *merge* ]]; then workspace_dir="${WORKSPACE}/resources/tools/doc_gen/_build" bucket_path="/csit/${GERRIT_BRANCH}/docs/" ;; + *"vpp-docs"*) + vpp_release="$(${WORKSPACE}/build-root/scripts/version rpm-version)" + # TODO: Remove conditional statement when stable/2106 and + # stable/2110 are no longer supported + if [[ "${vpp_release::2}" -ge "22" ]] ; then + workspace_dir="${WORKSPACE}/build-root/docs/html" + else + workspace_dir="${WORKSPACE}/docs/_build/html" + fi + bucket_path="/vpp/${vpp_release}/" + ;; + # TODO: Remove 'vpp-make-test-docs' when stable/2106 and + # stable/2110 are no longer supported + *"vpp-make-test-docs"*) + vpp_release="$(${WORKSPACE}/build-root/scripts/version rpm-version)" + workspace_dir="${WORKSPACE}/test/doc/build/html" + bucket_path="/vpp/${vpp_release}/vpp_make_test/html/" + ;; *) die "Unknown job: ${JOB_NAME}" esac @@ -48,5 +71,5 @@ if [[ ${JOB_NAME} == *merge* ]]; then terraform apply -no-color -auto-approve popd - echo "S3 docs: <a href=\"https://$CDN_URL/$bucket_path\">https://$CDN_URL/$bucket_path</a>" + echo "S3 docs: <a href=\"https://${CDN_URL}${bucket_path}\">https://${CDN_URL}${bucket_path}</a>" fi |