From 73f1adb2e84b8b9cd4045bcdd7d9afa72d3875b5 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Tue, 27 Nov 2012 17:13:03 -0500 Subject: [PATCH] Added short commit id column to log and history tables (issue 168) --- groovy/jenkins.groovy | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/groovy/jenkins.groovy b/groovy/jenkins.groovy index df4e588..d76a3d6 100644 --- a/groovy/jenkins.groovy +++ b/groovy/jenkins.groovy @@ -46,12 +46,17 @@ * 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 + * receivePack JGit Receive Pack org.eclipse.jgit.transport.ReceivePack + * 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 +67,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