<commit_before>- job-template:
    name: '{pipeline}-neutron-fwaas-dsvm-functional{job-suffix}'
    node: '{node}'

    wrappers:
      - build-timeout:
          timeout: 130
      - timestamps

    builders:
      - print-template-name:
          template-name: "{template-name}"
      - link-logs
      - net-info
      - devstack-checkout
      - shell: |
          #!/bin/bash -xe
          export PYTHONUNBUFFERED=true
          export DEVSTACK_GATE_UNSTACK=1
          export DEVSTACK_GATE_TEMPEST=0
          export DEVSTACK_GATE_EXERCISES=0
          export DEVSTACK_GATE_NEUTRON=1
          export DEVSTACK_GATE_INSTALL_TESTONLY=1
          export BRANCH_OVERRIDE={branch-override}
          if [ "$BRANCH_OVERRIDE" != "default" ] ; then
              export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
          fi

          function gate_hook {{
              bash -xe $BASE/new/neutron-fwaas/neutron_fwaas/tests/contrib/gate_hook.sh dsvm-functional
          }}
          export -f gate_hook

          function post_test_hook {{
             bash -xe $BASE/new/neutron-fwaas/neutron_fwaas/tests/contrib/post_test_hook.sh dsvm-functional
          }}
          export -f post_test_hook

          cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
          ./safe-devstack-vm-gate-wrap.sh

    publishers:
      - test-results
      - devstack-logs
      - console-log

- job-template:
    name: '{pipeline}-neutron-fwaas-{fwaas-version}-dsvm-tempest{branch-designator}{job-suffix}'
    node: '{node}'

    wrappers:
      - build-timeout:
          timeout: 125
      - timestamps

    builders:
      - link-logs
      - net-info
      - devstack-checkout
      - shell: |
          #!/bin/bash -xe
          export PYTHONUNBUFFERED=true
          export DEVSTACK_GATE_TEMPEST=1
          export DEVSTACK_GATE_TEMPEST_REGEX="^neutron_fwaas\."
          export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1
          export DEVSTACK_GATE_NEUTRON=1
          export BRANCH_OVERRIDE={branch-override}
          export FWAAS_VERSION={fwaas-version}
          if [ "$BRANCH_OVERRIDE" != "default" ] ; then
              export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
          fi
          if [[ "$ZUUL_BRANCH" != "stable/mitaka" ]]; then
              # Note the actual url here is somewhat irrelevant because it
              # caches in nodepool, however make it a valid url for
              # documentation purposes.
              export DEVSTACK_LOCAL_CONFIG="enable_plugin neutron-fwaas git://git.openstack.org/openstack/neutron-fwaas"
          fi
          if [ "$FWAAS_VERSION" = "v2" ] ; then
              export ENABLED_SERVICES="q-fwaas-v2"
          elif [ "$FWAAS_VERSION" = "v1" ] ; then
              export ENABLED_SERVICES="q-fwaas-v1"
          elif [ "$FWAAS_VERSION" = "legacy" ] ; then
              export ENABLED_SERVICES="q-fwaas"<commit_msg>neutron-fwaas: Consume gate hook for tempest plugin jobs<commit_after>- job-template:
    name: '{pipeline}-neutron-fwaas-dsvm-functional{job-suffix}'
    node: '{node}'

    wrappers:
      - build-timeout:
          timeout: 130
      - timestamps

    builders:
      - print-template-name:
          template-name: "{template-name}"
      - link-logs
      - net-info
      - devstack-checkout
      - shell: |
          #!/bin/bash -xe
          export PYTHONUNBUFFERED=true
          export DEVSTACK_GATE_UNSTACK=1
          export DEVSTACK_GATE_TEMPEST=0
          export DEVSTACK_GATE_EXERCISES=0
          export DEVSTACK_GATE_NEUTRON=1
          export DEVSTACK_GATE_INSTALL_TESTONLY=1
          export BRANCH_OVERRIDE={branch-override}
          if [ "$BRANCH_OVERRIDE" != "default" ] ; then
              export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
          fi

          function gate_hook {{
              bash -xe $BASE/new/neutron-fwaas/neutron_fwaas/tests/contrib/gate_hook.sh dsvm-functional
          }}
          export -f gate_hook

          function post_test_hook {{
             bash -xe $BASE/new/neutron-fwaas/neutron_fwaas/tests/contrib/post_test_hook.sh dsvm-functional
          }}
          export -f post_test_hook

          cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
          ./safe-devstack-vm-gate-wrap.sh

    publishers:
      - test-results
      - devstack-logs
      - console-log

- job-template:
    name: '{pipeline}-neutron-fwaas-{fwaas-version}-dsvm-tempest{branch-designator}{job-suffix}'
    node: '{node}'

    wrappers:
      - build-timeout:
          timeout: 125
      - timestamps

    builders:
      - link-logs
      - net-info
      - devstack-checkout
      - shell: |
          #!/bin/bash -xe
          export PYTHONUNBUFFERED=true
          export DEVSTACK_GATE_TEMPEST=1
          export DEVSTACK_GATE_TEMPEST_REGEX="^neutron_fwaas\."
          export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1
          export DEVSTACK_GATE_NEUTRON=1
          export BRANCH_OVERRIDE={branch-override}
          export FWAAS_VERSION={fwaas-version}
          if [ "$BRANCH_OVERRIDE" != "default" ] ; then
              export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
          fi
          if [[ "$ZUUL_BRANCH" != "stable/mitaka" ]]; then
              # Note the actual url here is somewhat irrelevant because it
              # caches in nodepool, however make it a valid url for
              # documentation purposes.
              export DEVSTACK_LOCAL_CONFIG="enable_plugin neutron-fwaas git://git.openstack.org/openstack/neutron-fwaas"
          fi
          function gate_hook {{
              bash -xe $BASE/new/neutron-fwaas/neutron_fwaas/tests/contrib/gate_hook_tempest.sh {fwaas-version}
          }}
          if [ "$FWAAS_VERSION" = "v2" ] ; then
              export ENABLED_SERVICES="q-fwaas-v2"
          elif [ "$FWAAS_VERSION" = "v1" ] ; then
              export ENABLED_SERVICES="q-fwaas-v1"
          elif [ "$FWAAS_VERSION" = "legacy" ] ; then
              export ENABLED_SERVICES="q-fwaas"
          fi

          if [[ ! "stable/liberty stable/mitaka stable/newton" =~ $ZUUL_BRANCH ]]; then
              export -f gate_hook
{'fraction_non_alphanumeric': 0.09888670595939751, 'fraction_numerical': 0.005893909626719057, 'mean_word_length': 1.9655339805825243, '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': '1055344', 'n_tokens_mistral': 2113, 'n_tokens_neox': 2024, 'n_words': 332}