796ca3000f
As part of the docs-migration, we already changed the publish job to only run on xenial - all official repos have eol'ed mitaka. Thus, remove the job definition for trusty as well. Change-Id: I8840ac0f4dafeaedb2743f5f89f876532336bf70
191 lines
5.7 KiB
YAML
191 lines
5.7 KiB
YAML
- job-template:
|
|
name: '{name}-docs-{node}'
|
|
node: '{node}'
|
|
|
|
builders:
|
|
- print-template-name:
|
|
template-name: "{template-name}"
|
|
- zuul-release-git-prep-upper-constraints
|
|
- install-distro-packages
|
|
- revoke-sudo
|
|
- docs
|
|
|
|
publishers:
|
|
- afs:
|
|
site: afs-docs
|
|
source: 'doc/build/html/**'
|
|
target: 'developer/{name}'
|
|
remove-prefix: 'doc/build/html'
|
|
- console-log
|
|
|
|
|
|
- job-template:
|
|
name: '{name}-docs-unified-{node}'
|
|
node: '{node}'
|
|
|
|
builders:
|
|
- print-template-name:
|
|
template-name: "{template-name}"
|
|
- zuul-release-git-prep-upper-constraints
|
|
- install-distro-packages
|
|
- revoke-sudo
|
|
- docs
|
|
- add-docs-root-marker:
|
|
docsrootdir: 'doc/build'
|
|
- shell: |
|
|
#!/bin/bash -x
|
|
|
|
if [[ $ZUUL_REFNAME =~ ^refs/tags/ ]]; then
|
|
# This job should not be configured to run for
|
|
# pre-releases, so if we have a tag we want to use it as
|
|
# the publishing location.
|
|
tag=$(echo $ZUUL_REFNAME | cut -d/ -f3-)
|
|
branch_name=""
|
|
else
|
|
# If the ref wasn't a tag, assume it is a branch.
|
|
branch_name=$ZUUL_REFNAME
|
|
tag=""
|
|
fi
|
|
|
|
# Rearrange the build output to reflect the end publishing
|
|
# location, so we can use doc/publish as the source for the
|
|
# publisher step.
|
|
mkdir -p doc/publish
|
|
|
|
if [[ ! -z "$tag" ]]; then
|
|
# run-docs.sh will have already moved the content inside
|
|
# a directory named for the tag, so we move that
|
|
# directory to the publish location.
|
|
mv doc/build/html/$tag doc/publish/
|
|
mv doc/build/.root-marker doc/publish/$tag/
|
|
|
|
elif [[ $branch_name = master ]]; then
|
|
# run-docs.sh does not rename the output directory, but
|
|
# we want it to be called "latest".
|
|
mv doc/build/html doc/publish/latest
|
|
mv doc/build/.root-marker doc/publish/latest/
|
|
|
|
elif [[ $branch_name =~ stable/ ]]; then
|
|
# run-docs.sh will have already moved the content inside
|
|
# a directory named for the branch, so move that to the
|
|
# publish location.
|
|
mv doc/build/html/$(basename $branch_name) doc/publish/
|
|
mv doc/build/.root-marker doc/publish/$(basename $branch_name)
|
|
|
|
elif [[ $branch_name =~ feature/ ]]; then
|
|
echo "Docs should not be published for feature branches"
|
|
exit 1
|
|
|
|
elif [[ $branch_name =~ driverfixes/ ]]; then
|
|
echo "Docs should not be published for feature branches"
|
|
exit 1
|
|
|
|
else
|
|
# What is this even?
|
|
echo "Could not determine publishing location for branch_name $branch_name"
|
|
exit 1
|
|
fi
|
|
|
|
publishers:
|
|
- afs:
|
|
site: afs-docs
|
|
source: 'doc/publish/**'
|
|
target: '{name}'
|
|
remove-prefix: 'doc/publish'
|
|
- console-log
|
|
|
|
|
|
- job-template:
|
|
name: '{name}-docs-tags-only'
|
|
description: Publish infra documents, use when only publish on tag
|
|
node: ubuntu-xenial
|
|
|
|
builders:
|
|
- print-template-name:
|
|
template-name: "{template-name}"
|
|
- zuul-release-git-prep-upper-constraints
|
|
- install-distro-packages
|
|
- revoke-sudo
|
|
- docs-tags-only-env:
|
|
env: venv
|
|
|
|
publishers:
|
|
- afs:
|
|
site: afs-docs
|
|
source: 'doc/build/html/**'
|
|
target: 'developer/{name}'
|
|
remove-prefix: 'doc/build/html'
|
|
- console-log
|
|
|
|
|
|
# Publish releasenotes to docs.openstack.org/releasenotes/. This is
|
|
# always published from master branch.
|
|
- job-template:
|
|
name: '{name}-releasenotes'
|
|
node: ubuntu-xenial
|
|
|
|
builders:
|
|
- print-template-name:
|
|
template-name: "{template-name}"
|
|
- zuul-git-branch-prep-upper-constraints:
|
|
branch: master
|
|
- install-distro-packages
|
|
- revoke-sudo
|
|
- shell: |
|
|
#!/bin/bash -xe
|
|
#
|
|
# When building the release notes after a patch merges we
|
|
# always want to build from master. Reno will find release
|
|
# notes on other branches and insert them into the right
|
|
# places in the documentation build, but only master has all
|
|
# of the appropriate branch-specific input files for
|
|
# Sphinx. The zuul-git-branch-prep builder checks out the
|
|
# repository where the current patch just merged, but it
|
|
# honors zuul configuration variables that may cause it to
|
|
# check out a patch merged into a stable branch. So, reset
|
|
# what we've checked out to master.
|
|
#
|
|
git checkout origin/master
|
|
- shell:
|
|
!include-raw-escape: include/build-releasenotes.sh
|
|
- add-docs-root-marker:
|
|
docsrootdir: releasenotes/build/html
|
|
|
|
publishers:
|
|
- afs:
|
|
site: afs-docs
|
|
source: 'releasenotes/build/html/**'
|
|
target: 'releasenotes/{name}'
|
|
remove-prefix: 'releasenotes/build/html'
|
|
- console-log
|
|
|
|
|
|
- job-template:
|
|
name: 'gate-{name}-releasenotes'
|
|
node: ubuntu-xenial
|
|
|
|
builders:
|
|
- print-template-name:
|
|
template-name: "{template-name}"
|
|
- zuul-git-prep-upper-constraints:
|
|
- install-distro-packages
|
|
- revoke-sudo
|
|
- shell:
|
|
!include-raw-escape: include/build-releasenotes.sh
|
|
|
|
publishers:
|
|
- upload-releasenotes-draft
|
|
- console-log
|
|
|
|
- job-group:
|
|
name: openstack-publish-jobs
|
|
jobs:
|
|
- '{name}-docs-unified-{node}'
|
|
node: ubuntu-xenial
|
|
|
|
- job-group:
|
|
name: openstack-releasenotes-jobs
|
|
jobs:
|
|
- 'gate-{name}-releasenotes'
|
|
- '{name}-releasenotes'
|