diff options
author | James Moger <james.moger@gmail.com> | 2015-12-23 08:43:39 -0500 |
---|---|---|
committer | James Moger <james.moger@gmail.com> | 2015-12-23 08:43:39 -0500 |
commit | 2539ceea0d47467d54cedd340afa6ede2909b2bd (patch) | |
tree | a49f7533b4f701b74626f1d38e91504e821966f7 | |
parent | 7b7b0d54b606e5a7d63ea39ec8918968f612d61d (diff) | |
parent | 306116c30db7714ec9011ae2d43addcc6bcdc081 (diff) | |
download | gitblit-2539ceea0d47467d54cedd340afa6ede2909b2bd.tar.gz gitblit-2539ceea0d47467d54cedd340afa6ede2909b2bd.zip |
Merge pull request #986 from rgroux/jenkins-groovy-all-proto
Change Jenkins groovy script for any protocol (git/http/ssh)
-rw-r--r-- | src/main/distrib/data/groovy/jenkins.groovy | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/distrib/data/groovy/jenkins.groovy b/src/main/distrib/data/groovy/jenkins.groovy index 422b2200..f029b26a 100644 --- a/src/main/distrib/data/groovy/jenkins.groovy +++ b/src/main/distrib/data/groovy/jenkins.groovy @@ -69,8 +69,11 @@ logger.info("jenkins hook triggered by ${user.username} for ${repository.name}") // gitblit.properties or web.xml
def jenkinsUrl = gitblit.getString('groovy.jenkinsServer', 'http://yourserver/jenkins')
+// define the repository base url
+def jenkinsGitbaseurl = gitblit.getString('groovy.jenkinsGitbaseurl', "${url}/r")
+
// define the trigger url
-def triggerUrl = jenkinsUrl + "/git/notifyCommit?url=${url}/r/${repository.name}"
+def triggerUrl = jenkinsUrl + "/git/notifyCommit?url=" + jenkinsGitbaseurl + "/${repository.name}"
// trigger the build
new URL(triggerUrl).getContent()
|