Skip to content

Commit c7d7456

Browse files
committed
build-name-setter
1 parent e3d85c4 commit c7d7456

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

libraries/job_blurbs.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ def githubProject(options = {})
2424
"""<assignedNode>%{nodes}</assignedNode>
2525
<canRoam>false</canRoam>""".gsub(/ /, '')
2626

27+
def env(name) = "${ENV,var=&quot;#{name}&quot;}"
28+
2729
<<-EOX
2830
<description>#{CGI.escapeHTML(description)}</description>
2931
<properties>
@@ -34,6 +36,9 @@ def githubProject(options = {})
3436
</parameterDefinitions>
3537
</hudson.model.ParametersDefinitionProperty>
3638
</properties>
39+
<org.jenkinsci.plugins.buildnamesetter.BuildNameSetter plugin="[email protected]">
40+
<template>[${BUILD_NUMBER}] of #{env(repoUser)}/#{env(repoName)}\##{env(repoRef)}</template>
41+
</org.jenkinsci.plugins.buildnamesetter.BuildNameSetter>
3742
#{scmBlurb}
3843
#{restriction % {nodes: nodeRestriction} if nodeRestriction}
3944
EOX

recipes/master-init.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
# nginx reverse proxy setup, in concert with JenkinsLocationConfiguration above
4545
include_recipe 'scala-jenkins-infra::_master-init-proxy'
4646

47-
%w(ssh-credentials cygpath job-dsl build-flow-plugin rebuild greenballs build-timeout copyartifact email-ext slack throttle-concurrents dashboard-view parameterized-trigger).each do |plugin|
47+
%w(ssh-credentials build-name-setter cygpath job-dsl build-flow-plugin rebuild greenballs build-timeout copyartifact email-ext slack throttle-concurrents dashboard-view parameterized-trigger).each do |plugin|
4848
plugin, version = plugin.split('=') # in case we decide to pin versions later
4949
jenkins_plugin plugin
5050
end

0 commit comments

Comments
 (0)