X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Frtd-trigger-build.sh;h=5c47ea645ea76fdc18e584c6112be7ea14e520ba;hb=refs%2Fchanges%2F34%2F9634%2F4;hp=21e72694a241d56395f6969ed9671d9fe0540be8;hpb=3ea6a674e095bb64a4830c4bd2bb66e155a674b2;p=releng%2Fglobal-jjb.git diff --git a/shell/rtd-trigger-build.sh b/shell/rtd-trigger-build.sh index 21e72694..5c47ea64 100644 --- a/shell/rtd-trigger-build.sh +++ b/shell/rtd-trigger-build.sh @@ -20,4 +20,12 @@ else RTD_BUILD_VERSION="${GERRIT_BRANCH/\//-}" fi -curl -X POST --data "version_slug=$RTD_BUILD_VERSION" "https://readthedocs.org/build/$RTD_PROJECT" +CREDENTIAL=$(xmlstarlet sel -N "x=http://maven.apache.org/SETTINGS/1.0.0" \ + -t -m "/x:settings/x:servers/x:server[x:id='${SERVER_ID}']" \ + -v x:username -o ":" -v x:password \ + "$SETTINGS_FILE") + +RTD_BUILD_TOKEN=$(echo "$CREDENTIAL" | cut -f2 -d:) + +curl -X POST -d "branches=$RTD_BUILD_VERSION" -d "token=$RTD_BUILD_TOKEN" "$RTD_BUILD_URL" +