diff --git a/jobs/build-triggers/tendrl-build-triggers-pr-tests.yml b/jobs/build-triggers/tendrl-build-triggers-pr-tests.yml
new file mode 100644
index 0000000..0203953
--- /dev/null
+++ b/jobs/build-triggers/tendrl-build-triggers-pr-tests.yml
@@ -0,0 +1,170 @@
+---
+- job-template:
+ name: "tendrl-pr-trigger-tests-{package_name}"
+ display-name: 'Tendrl test (PR) - {package_name}'
+ description: |
+ Job triggering test suite execution.
+
+ It might be triggered by following phrase in comment in the respective PR:
+
+ run tests
+
+ And it is also possible to specify dependencies on PRs from other repos
+ in following format (in the PR description or in the comment triggering
+ the tests)
+
+ Depends on: <repo-name>/pr<pr_id> <repo2-name>/pr<pr2_id>
+
+ where <repo-name> is repo name including tendrl- prefix
+ and <pr_id> is PR number.
+
+ Maintainer: Daniel Horak
+ Team Contact: tendrl-devel
+ JJB Code Location: tendrl-ci
+ Managed by Jenkins Job Builder. Do not edit via web.
+ project-type: freestyle
+ package_prefix: "tendrl-"
+ defaults: global
+ disabled: false
+ concurrent: false
+ quiet-period: 0
+ block-downstream: false
+ block-upstream: false
+ node: 'tendrl-ci-slave01'
+ triggers: "{obj:triggers}"
+ scm: "{obj:scm}"
+ properties:
+ - github:
+ url: 'https://github.com/Tendrl/{package_name}/'
+ wrappers:
+ - timeout:
+ timeout: 60
+ abort: true
+ type: absolute
+ parameters:
+ - string:
+ name: ADDITIONAL_REPOS
+ default: ""
+ description: "Coma separated list of additional repos."
+ - string:
+ name: ADDITIONAL_REPOS_USM_SERVER
+ default: ""
+ description: "Coma separated list of additional repos."
+ - string:
+ name: ADDITIONAL_REPOS_USM_NODES
+ default: ""
+ description: "Coma separated list of additional repos."
+ - string:
+ name: ADDITIONAL_REPOS_USM_CLIENT
+ default: ""
+ description: "Coma separated list of additional repos."
+ builders:
+ - shell: |
+ #!/bin/bash -xe
+ echo
+ if [[ "${{ghprbPullId}}" ]]; then
+ echo "ghprbPullId: ${{ghprbPullId}}"
+ echo "ghprbCommentBody: ${{ghprbCommentBody}}"
+ echo "ghprbPullLongDescription: ${{ghprbPullLongDescription}}"
+ ADDITIONAL_REPOS="${{ADDITIONAL_REPOS}},http://artifacts.ci.centos.org/tendrl/pr/{package_prefix}{package_name}/pr${{ghprbPullId}}/{package_prefix}{package_name}-pr${{ghprbPullId}}.repo"
+ echo
+ echo "Parse ghprbCommentBody and ghprbPullLongDescription for dependent PRs."
+ # filter only lines containing "depends on:" string (and remove it)
+ # so it will iterate over list similar to this:
+ # tendrl-notifier/pr153 tendrl-commons/pr820 ...
+ for dependency in $(echo -e "${{ghprbCommentBody}}\n${{ghprbPullLongDescription}}" | \
+ grep -i "depends on:" | sed 's/depends on: //I'); do
+ package=${{dependency%/*}}
+ pr_id=${{dependency#*/}}
+ ADDITIONAL_REPOS="${{ADDITIONAL_REPOS}},http://artifacts.ci.centos.org/tendrl/pr/${{package}}/${{pr_id}}/${{package}}-${{pr_id}}.repo"
+ done
+ echo
+ fi
+
+ # Prepare env.sh file
+ echo > ${{WORKSPACE}}/env.sh
+ # use cop tendrl/tendrl (master) repo
+ echo "TENDRL_REPO=master" >> ${{WORKSPACE}}/env.sh
+ # configure additional repos
+ echo "ADDITIONAL_REPOS=${{ADDITIONAL_REPOS}}" >> ${{WORKSPACE}}/env.sh
+ echo "ADDITIONAL_REPOS_USM_SERVER=${{ADDITIONAL_REPOS_USM_SERVER}}" >> ${{WORKSPACE}}/env.sh
+ echo "ADDITIONAL_REPOS_USM_NODES=${{ADDITIONAL_REPOS_USM_NODES}}" >> ${{WORKSPACE}}/env.sh
+ echo "ADDITIONAL_REPOS_USM_CLIENT=${{ADDITIONAL_REPOS_USM_CLIENT}}" >> ${{WORKSPACE}}/env.sh
+ set +x
+
+ echo
+ echo "##############################################################"
+ echo "Run whole test suite."
+ echo
+ - trigger-builds:
+ - project: "tendrl-2-cluster-gluster"
+ property-file: env.sh
+ block: true
+
+ publishers:
+ - email:
+ recipients: dahorak@redhat.com
+
+
+- project:
+ name: 'Test_suite'
+ triggers:
+ - github-pull-request:
+ admin-list:
+ - dahorak
+ white-list:
+ - a2batic
+ - cloudbehl
+ - fbalak
+ - gnehapk
+ - GowthamShanmugam
+ - julienlim
+ - ktdreyer
+ - ltrilety
+ - mbukatov
+ - mcarrano
+ - nnDarshan
+ - nthomas-redhat
+ - r0h4n
+ - rishubhjain
+ - sankarshanmukhopadhyay
+ - scuttlemonkey
+ - shirshendu
+ - shtripat
+ - sidhax
+ - tigert
+ - TimothyAsir
+ - TimothyAsirJeyasing
+ org-list:
+ - Tendrl
+ allow-whitelist-orgs-as-admins: false
+ trigger-phrase: '.*run test.*'
+ only-trigger-phrase: true
+ skip-build-phrase: 'no test'
+ github-hooks: true
+ cancel-builds-on-update: true
+ status-context: 'CentOS CI - tests'
+ status-add-test-results: false
+ scm:
+ - git:
+ url: 'https://github.com/Tendrl/{package_name}'
+ refspec: "+refs/pull/${{ghprbPullId}}/*:refs/remotes/origin/pr/${{ghprbPullId}}/*"
+ branches:
+ - "origin/pr/**"
+ basedir: tendrl-{package_name}
+ skip-tag: true
+ wipe-workspace: true
+ jobs:
+ - "tendrl-pr-trigger-tests-{package_name}"
+ package_name:
+ - api
+ - commons
+ - gluster-integration
+ - monitoring-integration
+ - node-agent
+ - notifier
+ - tendrl-ansible:
+ package_prefix: ""
+ - tendrl-selinux:
+ package_prefix: ""
+ - ui
diff --git a/jobs/build-triggers/tendrl-build-triggers.yml b/jobs/build-triggers/tendrl-build-triggers.yml
index 287b02d..d263137 100644
--- a/jobs/build-triggers/tendrl-build-triggers.yml
+++ b/jobs/build-triggers/tendrl-build-triggers.yml
@@ -113,7 +113,7 @@
condition: ALWAYS
- email:
- recipients: dahorak@redhat.com sds-mgmt-dev@redhat.com
+ recipients: dahorak@redhat.com
send-to-individuals: false