<commit_before>- builder:
    name: gerrit-git-prep
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/gerrit-git-prep.sh https://review.openstack.org http://zuul.openstack.org git://git.openstack.org"

- builder:
    name: coverage
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-cover.sh {github-org} {project}"

- builder:
    name: docs
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-docs.sh {github-org} {project}"

- builder:
    name: maven-test
    builders:
      - shell: "mvn test -B"

- builder:
    name: maven-package
    builders:
      - shell: "mvn package -B"

- builder:
    name: markdown-docbook
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/markdown-docbook.sh {filename}"

- builder:
    name: gerrit-package
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/package-gerrit.sh"

- builder:
    name: gerrit-preclean
    builders:
      - shell: |
          #!/bin/bash -xe
          rm -fr ~/.m2
          rm -fr ~/.java
          ./tools/version.sh --release

- builder:
    name: gerrit-postrun
    builders:
      - shell: "./tools/version.sh --reset"

- builder:
    name: bash8
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-bash8.sh {github-org} {project}"

- builder:
    name: pep8
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-pep8.sh {github-org} {project}"

- builder:
    name: pylint
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-pylint.sh {github-org} {project}"

- builder:
    name: puppet-lint
    builders:
      - shell: |
          if [ -f Modulefile ]; then
            MODULE=$(awk '/^name/ {print $NF}' Modulefile |tr -d \"\')
            if [ -z "$MODULE" ]; then
              echo "Module name not defined in Modulefile"
            else
              mkdir -p "$MODULE"
              rsync -a --exclude="$MODULE" --exclude ".*" . "$MODULE"
              cd "$MODULE"
            fi
          fi
          rake lint 2>&1

- builder:
    name: puppet-syntax
    builders:
      - shell: |
          find . -iname *.pp | xargs puppet parser validate --modulepath=`pwd`/modules
          for f in `find . -iname *.erb` ; do
            erb -x -T '-' $f | ruby -c
          done

- builder:
    name: chef-cookbook-prep
    builders:
      - shell: |
          mkdir -p .cookbooks .bundle
          ruby1.9.1 /usr/bin/bundle install --path=.bundle
          ruby1.9.1 /usr/bin/bundle exec berks install --path=.cookbooks
          COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
          if [ -z $COOKBOOK ]; then
              echo "Cookbook name not defined in metadata.rb"
              exit 1
          fi

- builder:
    name: chef-cookbook-style
    builders:
      - shell: |
          COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
          ruby1.9.1 /usr/bin/bundle exec tailor

- builder:
    name: chef-cookbook-lint
    builders:
      - shell: |
          COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
          ruby1.9.1 /usr/bin/bundle exec foodcritic -f any -t ~FC003 -t ~FC023 .cookbooks/$COOKBOOK

- builder:
    name: chef-cookbook-rspec
    builders:
      - shell: |
          COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
          ruby1.9.1 /usr/bin/bundle exec rspec .cookbooks/$COOKBOOK

- builder:
    name: run-tests
    builders:
      - shell: "./run-tests.sh {github-org} {project}"

- builder:
    name: selenium
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-selenium.sh {github-org} {project}"

- builder:
    name: python26
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-unittests.sh 26 {github-org} {project}"

- builder:
    name: python27
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-unittests.sh 27 {github-org} {project}"

- builder:
    name: python33
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-unittests.sh 33 {github-org} {project}"

- builder:
    name: pypy
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-unittests.sh py {github-org} {project}"

- builder:
    name: tox
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-tox.sh {envlist} {github-org} {project}"

- builder:
    name: assert-no-extra-files
    builders:
      - shell: |
          #!/bin/bash
          OUT=`git ls-files --other --exclude-standard --directory`
          if [ -z "$OUT" ]; then
              echo "No extra files created during test."
              exit 0
          else
              echo "The following un-ignored files were created during the test:"
              echo "$OUT"
              exit 0  # TODO: change to 1 to fail tests.
          fi

- builder:
    name: tarball
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-tarball.sh {github-org} {project}"

- builder:
    name: devstack-checkout
    builders:
      - shell: |
          #!/bin/bash -xe
          if [[ ! -e devstack-gate ]]; then
              git clone https://review.openstack.org/p/openstack-infra/devstack-gate
          else
              cd devstack-gate
              git remote set-url origin https://review.openstack.org/p/openstack-infra/devstack-gate
              git remote update
              git reset --hard
              if ! git clean -x -f ; then
                  sleep 1<commit_msg>Switch devstack checkout to use git.o.o<commit_after>- builder:
    name: gerrit-git-prep
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/gerrit-git-prep.sh https://review.openstack.org http://zuul.openstack.org git://git.openstack.org"

- builder:
    name: coverage
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-cover.sh {github-org} {project}"

- builder:
    name: docs
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-docs.sh {github-org} {project}"

- builder:
    name: maven-test
    builders:
      - shell: "mvn test -B"

- builder:
    name: maven-package
    builders:
      - shell: "mvn package -B"

- builder:
    name: markdown-docbook
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/markdown-docbook.sh {filename}"

- builder:
    name: gerrit-package
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/package-gerrit.sh"

- builder:
    name: gerrit-preclean
    builders:
      - shell: |
          #!/bin/bash -xe
          rm -fr ~/.m2
          rm -fr ~/.java
          ./tools/version.sh --release

- builder:
    name: gerrit-postrun
    builders:
      - shell: "./tools/version.sh --reset"

- builder:
    name: bash8
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-bash8.sh {github-org} {project}"

- builder:
    name: pep8
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-pep8.sh {github-org} {project}"

- builder:
    name: pylint
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-pylint.sh {github-org} {project}"

- builder:
    name: puppet-lint
    builders:
      - shell: |
          if [ -f Modulefile ]; then
            MODULE=$(awk '/^name/ {print $NF}' Modulefile |tr -d \"\')
            if [ -z "$MODULE" ]; then
              echo "Module name not defined in Modulefile"
            else
              mkdir -p "$MODULE"
              rsync -a --exclude="$MODULE" --exclude ".*" . "$MODULE"
              cd "$MODULE"
            fi
          fi
          rake lint 2>&1

- builder:
    name: puppet-syntax
    builders:
      - shell: |
          find . -iname *.pp | xargs puppet parser validate --modulepath=`pwd`/modules
          for f in `find . -iname *.erb` ; do
            erb -x -T '-' $f | ruby -c
          done

- builder:
    name: chef-cookbook-prep
    builders:
      - shell: |
          mkdir -p .cookbooks .bundle
          ruby1.9.1 /usr/bin/bundle install --path=.bundle
          ruby1.9.1 /usr/bin/bundle exec berks install --path=.cookbooks
          COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
          if [ -z $COOKBOOK ]; then
              echo "Cookbook name not defined in metadata.rb"
              exit 1
          fi

- builder:
    name: chef-cookbook-style
    builders:
      - shell: |
          COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
          ruby1.9.1 /usr/bin/bundle exec tailor

- builder:
    name: chef-cookbook-lint
    builders:
      - shell: |
          COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
          ruby1.9.1 /usr/bin/bundle exec foodcritic -f any -t ~FC003 -t ~FC023 .cookbooks/$COOKBOOK

- builder:
    name: chef-cookbook-rspec
    builders:
      - shell: |
          COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
          ruby1.9.1 /usr/bin/bundle exec rspec .cookbooks/$COOKBOOK

- builder:
    name: run-tests
    builders:
      - shell: "./run-tests.sh {github-org} {project}"

- builder:
    name: selenium
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-selenium.sh {github-org} {project}"

- builder:
    name: python26
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-unittests.sh 26 {github-org} {project}"

- builder:
    name: python27
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-unittests.sh 27 {github-org} {project}"

- builder:
    name: python33
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-unittests.sh 33 {github-org} {project}"

- builder:
    name: pypy
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-unittests.sh py {github-org} {project}"

- builder:
    name: tox
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-tox.sh {envlist} {github-org} {project}"

- builder:
    name: assert-no-extra-files
    builders:
      - shell: |
          #!/bin/bash
          OUT=`git ls-files --other --exclude-standard --directory`
          if [ -z "$OUT" ]; then
              echo "No extra files created during test."
              exit 0
          else
              echo "The following un-ignored files were created during the test:"
              echo "$OUT"
              exit 0  # TODO: change to 1 to fail tests.
          fi

- builder:
    name: tarball
    builders:
      - shell: "/usr/local/jenkins/slave_scripts/run-tarball.sh {github-org} {project}"

- builder:
    name: devstack-checkout
    builders:
      - shell: |
          #!/bin/bash -xe
          if [[ ! -e devstack-gate ]]; then
              git clone git://git.openstack.org/openstack-infra/devstack-gate
          else
              cd devstack-gate
              git remote set-url origin git://git.openstack.org/openstack-infra/devstack-gate
              git remote update
              git reset --hard
              if ! git clean -x -f ; then
                  sleep 1
{'fraction_non_alphanumeric': 0.13920770085153647, 'fraction_numerical': 0.008330248056275453, 'mean_word_length': 1.8094123764950598, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '7060682', 'n_tokens_mistral': 3692, 'n_tokens_neox': 3558, 'n_words': 842}