- builder: name: test-builder builders: - shell: echo Builder {builder_name} is starting echo hello world
This builder should output:
Builder test-builder is starting
hello world
--
You received this message because you are subscribed to the Google Groups "jenkins-job-builder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins-job-bui...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkins-job-builder/4505a4c8-a2b8-4993-91aa-62a45661b7efn%40googlegroups.com.
- builder:name: builder-testbuilders:- shell:echo {name}
- job:name: testbuilders:- builder-test
<builders><hudson.tasks.Shell><command>echo {name}</command></hudson.tasks.Shell>
Aleksey;There's a note in the documentation that states if you use a parameterized macro but pass it no parameters the replacement will NOT be performed which explains why you are seeing what you are. I assume you might be wanting to do what you are asking because you might be wanting to use the name of the builder in several locations in the shell macro. You might be just as well off to statically assign the builder name to a shell variable at the top of your script:
--
You received this message because you are subscribed to the Google Groups "jenkins-job-builder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins-job-bui...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkins-job-builder/CACR765-ED5yXs0Az099tUYz87bi7kMaSS5%2Bo3D_HeLd-Yr_DYA%40mail.gmail.com.