This repository has been archived by the owner on Dec 15, 2021. It is now read-only.
[JENKINS-26093] Better support for build step parameters #69
Merged
jglick
merged 9 commits into
jenkinsci:master
from
jglick:BuildTriggerStep.parameters-JENKINS-26093
Mar 4, 2015
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
72860e9
[JENKINS-26093] Allow parameter values to be specified using standard…
jglick 276eee3
[JENKINS-26093] Look up the downstream parameter definitions and show…
jglick cc5ceee
Forgotten console.log.
jglick 2a19715
FindBugs
jglick ccc6df5
Added test for BuildTriggerStep.DescriptorImpl.newInstance.
jglick b968cbc
Passing in an item context so as to support an upstream flow in a fol…
jglick df33de3
Noting that CredentialsParameterDefinition is not working here for now.
jglick 20e0a9c
Testing and fixing parameter generation across folders.
jglick 495edb4
Merge branch 'master' into BuildTriggerStep.parameters-JENKINS-26093
jglick File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...ci/plugins/workflow/support/steps/build/BuildTriggerStep/DescriptorImpl/parameters.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.jenkinsci.plugins.workflow.support.steps.build.BuildTriggerStep; | ||
def st = namespace('jelly:stapler') | ||
def l = namespace('/lib/layout') | ||
l.ajax { | ||
def jobName = request.getParameter('job') | ||
if (jobName != null) { | ||
def job = app.getItemByFullName(jobName, hudson.model.Job) | ||
if (job != null) { | ||
def pdp = job.getProperty(hudson.model.ParametersDefinitionProperty) | ||
if (pdp != null) { | ||
table(width: '100%', class: 'parameters') { | ||
for (parameterDefinition in pdp.parameterDefinitions) { | ||
tbody { | ||
st.include(it: parameterDefinition, page: parameterDefinition.descriptor.valuePage) | ||
} | ||
} | ||
} | ||
} else { | ||
text("${job.fullDisplayName} is not parameterized") | ||
} | ||
} else { | ||
text("no such job ${jobName}") | ||
} | ||
} else { | ||
text('no job specified') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just occurred to me that this will not handle relative paths, need to fix that.