- job-template:
    name: '{name}-integration'
    project-type: multibranch
    periodic-folder-trigger: 5m
    number-to-keep: 30
    days-to-keep: 30
    script-path: Jenkinsfile.integration
    scm:
      - github:
          repo: '{repo-name}'
          repo-owner: '{repo-owner}'
          credentials-id: '{repo-credentials}'
          branch-discovery: no-pr
          discover-pr-forks-strategy: current
          discover-pr-forks-trust: contributors
          discover-pr-origin: current
          submodule:
            recursive: true
          notification-context: continuous-integration/jenkins
          filter-head-regex: ^(master|release\-\d\.\d|PR\-\d+)$

- job-template:
    name: '{name}-integration'
    project-type: multibranch
    periodic-folder-trigger: 5m
    number-to-keep: 30
    days-to-keep: 30
    script-path: Jenkinsfile.integration
    scm:
      - github:
          repo: '{repo-name}'
          repo-owner: '{repo-owner}'
          credentials-id: '{repo-credentials}'
          branch-discovery: no-pr
          discover-pr-forks-strategy: merge-current
          discover-pr-forks-trust: contributors
          discover-pr-origin: merge-current
          submodule:
            recursive: true
          notification-context: continuous-integration/jenkins
          filter-head-regex: ^(master|release\-\d\.\d|PR\-\d+)$

Fix merge strategy for PR testing
socok8s: Fix merge strategy for PR testing

Instead of using the current HEAD of the PR branch, merge it what is
currently in the target branch. That way we test what we get in the
end when something got merged.
