Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash -xe
- VIRTUAL_ENV="${JENKINS_HOME}/VirtualEnvs/${JOB_NAME}"
- . "${VIRTUAL_ENV}/bin/activate"
- RSYNC_OPTS="-a --delete --progress --exclude=.repo.lock --exclude .git/\*"
- RSYNC_RSH="ssh -o User=jenkins"
- # By default we go to docs.testing.ansible.com dir
- RSYNC_TARGET="${ANSIBLE_NIGHTLY_DOCS_PATH}"
- if [ "$OFFICIAL" = "yes" ]; then
- # Copy into docs.ansible.com dir
- RSYNC_TARGET="${ANSIBLE_RELEASE_DOCS_PATH}"
- fi
- # Get the version in the form 2.7
- # Note: this will return 2.8 (not devel)
- VERSION=$(make version -B | cut -f 1-2 -d .)
- make webdocs
- if [ "${GIT_BRANCH}" == "origin/devel" ]; then
- # We are using devel, not 2.?
- VERSION=devel
- fi
- rsync ${RSYNC_OPTS} --rsh "${RSYNC_RSH}" docs/docsite/_build/html/ "${RSYNC_TARGET}/$VERSION/"
- if [ "${OLD_VERSION}" == "no" ]; then
- # Add latest symlink
- ln -s $VERSION docs/docsite/_build/latest
- rsync ${RSYNC_OPTS} --rsh "${RSYNC_RSH}" docs/docsite/_build/latest "${RSYNC_TARGET}"
- fi
- # Sync releases mirrors
- if [[ ( "$OFFICIAL" == "yes" ) || ( "$GIT_BRANCH" == "origin/devel" ) ]]; then
- echo -e "build" > sync_releases.cfg
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement