Code Review
/
releng
/
global-jjb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
gerrit-tox-verify: Allow skip-vote configuration
[releng/global-jjb.git]
/
shell
/
jjb-deploy-job.sh
diff --git
a/shell/jjb-deploy-job.sh
b/shell/jjb-deploy-job.sh
index
771f17b
..
240c1fa
100644
(file)
--- a/
shell/jjb-deploy-job.sh
+++ b/
shell/jjb-deploy-job.sh
@@
-19,8
+19,11
@@
set -e -o pipefail
# shellcheck source=/tmp/v/jenkins-job-builder/bin/activate disable=SC1091
source "/tmp/v/jenkins-job-builder/bin/activate"
# shellcheck source=/tmp/v/jenkins-job-builder/bin/activate disable=SC1091
source "/tmp/v/jenkins-job-builder/bin/activate"
-echo "-----> Fetching project"
-git fetch origin "$GERRIT_REFSPEC" && git checkout FETCH_HEAD
+# Fetch patch if gerrit project matches the jjb-deploy project
+if [ "${GERRIT_PROJECT}" == "${PROJECT}" ]; then
+ echo "-----> Fetching ${PROJECT} patch"
+ git fetch origin "$GERRIT_REFSPEC" && git checkout FETCH_HEAD
+fi
# If not Gerrit Trigger than assume GitHub
COMMENT="${GERRIT_EVENT_COMMENT_TEXT:-$ghprbCommentBody}"
# If not Gerrit Trigger than assume GitHub
COMMENT="${GERRIT_EVENT_COMMENT_TEXT:-$ghprbCommentBody}"