<commit_before>- 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-trusty
      - ubuntu-xenial

- job-group:
    name: openstack-releasenotes-jobs
    jobs:
      - 'gate-{name}-releasenotes'
      - '{name}-releasenotes'<commit_msg>Remove trusty docs publish job<commit_after>- 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'
{'fraction_non_alphanumeric': 0.10159345754995364, 'fraction_numerical': 0.0006744793862237586, 'mean_word_length': 1.6831033702782177, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4427555', 'n_tokens_mistral': 3504, 'n_tokens_neox': 3327, 'n_words': 948}