From a31cf95ac0787eb559cb78f48c52bc6b79e970d8 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Wed, 11 Jul 2012 17:10:42 -0400 Subject: [PATCH] Forgot to commit UserModel with cookie field --- groovy/jenkins.groovy | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/groovy/jenkins.groovy b/groovy/jenkins.groovy index df4e588..7336058 100644 --- a/groovy/jenkins.groovy +++ b/groovy/jenkins.groovy @@ -46,12 +46,16 @@ * exception handler so it will not crash another script nor crash Gitblit. * * Bound Variables: - * gitblit Gitblit Server com.gitblit.GitBlit - * repository Gitblit Repository com.gitblit.models.RepositoryModel - * user Gitblit User com.gitblit.models.UserModel - * commands JGit commands Collection<org.eclipse.jgit.transport.ReceiveCommand> - * url Base url for Gitblit String - * logger Logger instance org.slf4j.Logger + * gitblit Gitblit Server com.gitblit.GitBlit + * repository Gitblit Repository com.gitblit.models.RepositoryModel + * user Gitblit User com.gitblit.models.UserModel + * commands JGit commands Collection<org.eclipse.jgit.transport.ReceiveCommand> + * url Base url for Gitblit String + * logger Logs messages to Gitblit org.slf4j.Logger + * clientLogger Logs messages to Git client com.gitblit.utils.ClientLogger + * + * Accessing Gitblit Custom Fields: + * def myCustomField = repository.customFields.myCustomField * */ // Indicate we have started the script @@ -62,10 +66,10 @@ // define your jenkins url here or set groovy.jenkinsServer in // gitblit.properties or web.xml -def jenkinsUrl = gitblit.getString("groovy.jenkinsServer", "http://yourserver/jenkins") +def jenkinsUrl = gitblit.getString('groovy.jenkinsServer', 'http://yourserver/jenkins') // define the trigger url -def triggerUrl = jenkinsUrl + "/git/notifyCommit?url=" + url + "/git/" + repository.name +def triggerUrl = jenkinsUrl + "/git/notifyCommit?url=$url/git/$repository.name" // trigger the build new URL(triggerUrl).getContent() -- Gitblit v1.9.1