Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions ci_scripts/ci_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ if [ "${BUILD_DOC}" = "true" ] && [ -x /usr/local/bin/sphinx-build ] ; then
git reset --hard && git clean -dfx
cd ${DIR_PATH}

if [ -n "${BOS_CREDENTIAL_AK}" ] && [ -n "${BOS_CREDENTIAL_SK}" ] ; then
echo "Ak = ${BOS_CREDENTIAL_AK}" >> ${BCECMD_CONFIG}/credentials
echo "Sk = ${BOS_CREDENTIAL_SK}" >> ${BCECMD_CONFIG}/credentials
fi
if [ $xdebug_setted ] ; then
set -x
fi
Expand All @@ -70,14 +66,12 @@ if [ "${BUILD_DOC}" = "true" ] && [ -x /usr/local/bin/sphinx-build ] ; then
if [ "${UPLOAD_DOC}" = "true" ] ; then
PREVIEW_JOB_NAME="preview-pr-${GIT_PR_ID}"
BOSBUCKET=${BOSBUCKET:=paddle-site-web-dev}
${BCECMD} --conf-path ${BCECMD_CONFIG} bos sync "${OUTPUTDIR}/en/${VERSIONSTR}" "bos:/${BOSBUCKET}/documentation/en/${PREVIEW_JOB_NAME}" \
--delete --yes --exclude "${OUTPUTDIR}/en/${VERSIONSTR}/_sources/"
${BCECMD} --conf-path ${BCECMD_CONFIG} bos sync "${OUTPUTDIR}/en/${VERSIONSTR}" "bos:/${BOSBUCKET}/documentation/en/${PREVIEW_JOB_NAME}" \
--delete --yes --exclude "${OUTPUTDIR}/en/${VERSIONSTR}/_sources/"
${BCECMD} --conf-path ${BCECMD_CONFIG} bos sync "${OUTPUTDIR}/zh/${VERSIONSTR}" "bos:/${BOSBUCKET}/documentation/zh/${PREVIEW_JOB_NAME}" \
--delete --yes --exclude "${OUTPUTDIR}/zh/${VERSIONSTR}/_sources/"
${BCECMD} --conf-path ${BCECMD_CONFIG} bos sync "${OUTPUTDIR}/zh/${VERSIONSTR}" "bos:/${BOSBUCKET}/documentation/zh/${PREVIEW_JOB_NAME}" \
--delete --yes --exclude "${OUTPUTDIR}/zh/${VERSIONSTR}/_sources/"
wget -q --no-proxy https://xly-devops.bj.bcebos.com/home/bos_dir.tar --no-check-certificate
tar xf bos_dir.tar
python3 -m pip install bce-python-sdk==0.8.74
# use bos_der.tar: The first parameter is to upload the directory, the second parameter is to upload the BOS directory, and the third parameter is to exclude the directory
python3 BosClient.py ${OUTPUTDIR}/en/${VERSIONSTR} ${BOSBUCKET}/documentation/en/${PREVIEW_JOB_NAME} ${OUTPUTDIR}/en/${VERSIONSTR}/_sources/
python3 BosClient.py ${OUTPUTDIR}/zh/${VERSIONSTR} ${BOSBUCKET}/documentation/zh/${PREVIEW_JOB_NAME} ${OUTPUTDIR}/zh/${VERSIONSTR}/_sources/
# print preview url
PREVIEW_URL_PROMPT="ipipe_log_param_preview_url: http://${PREVIEW_JOB_NAME}.${PREVIEW_SITE:-preview.paddlepaddle.org}/documentation/docs/zh/api/index_cn.html"
fi
Expand Down