Skip to content

Commit

Permalink
adding branch name passing to jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
mfamilia committed Apr 22, 2012
1 parent 327026d commit 9199bc2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/config/default.xml.erb
Expand Up @@ -22,6 +22,11 @@
<description></description>
<defaultValue></defaultValue>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>JANKY_BRANCH</name>
<description></description>
<defaultValue></defaultValue>
</hudson.model.StringParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
<com.tikal.hudson.plugins.notification.HudsonNotificationProperty>
Expand Down
3 changes: 2 additions & 1 deletion lib/janky/builder/runner.rb
Expand Up @@ -20,7 +20,8 @@ def output
def json_params
Yajl.dump(:parameter => [
{ :name => "JANKY_SHA1", :value => @build.sha1 },
{ :name => "JANKY_ID", :value => @build.id }
{ :name => "JANKY_ID", :value => @build.id },
{ :name => "JANKY_BRANCH", :value => @build.branch_name }
])
end

Expand Down
1 change: 1 addition & 0 deletions lib/janky/repository.rb
Expand Up @@ -163,6 +163,7 @@ def job_url
#
# Returns a String hash of this Repository name and uri.
def job_name
#TODO add logic to provide a custom job name
md5 = Digest::MD5.new
md5 << name
md5 << uri
Expand Down

0 comments on commit 9199bc2

Please sign in to comment.