-
Notifications
You must be signed in to change notification settings - Fork 970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for secret param in material #5991
Support for secret param in material #5991
Conversation
@@ -140,7 +140,7 @@ private BuildCommand cleanWorkingDir(String workDir) { | |||
|
|||
private BuildCommand isRepoUrlChanged(String workDir) { | |||
return test("-neq", | |||
material.getUrlArgument().forCommandline(), | |||
material.getUrlArgument().rawUrl(), |
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.
This should be changed back to forCommandline()
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.
done
@@ -159,7 +159,7 @@ private BuildCommand cmdClone(String workDir, int cloneDepth) { | |||
if (material.isShallowClone()) { | |||
cloneArgs.add(format("--depth=%s", String.valueOf(cloneDepth))); | |||
} | |||
cloneArgs.add(material.getUrlArgument().forCommandline()); | |||
cloneArgs.add(material.getUrlArgument().rawUrl()); |
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.
This should be changed back to forCommandline()
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.
done
3843534
to
bc026f8
Compare
public String forDisplay() { | ||
if (hasSecretParams()) { |
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.
We might have to change this, e.g https://#{SECRET[id][key]}:password@foo.com/bar.git
how will this be handled?
5a3c97e
to
a6c19ac
Compare
…CommandLine, forDisplay for secret param
a6c19ac
to
e2dcab4
Compare
* Added method `rawUrl` in CommandArgument to get unresolved url. * Updated usages of getUrl and forCommandLine * Moving to use junit5. It was reverted back to junit4 in PR gocd#5964. * Update UrlArgument to return appropraite value as part of rawUrl, forCommandLine, forDisplay for secret param * Renamed rawUrl to originalArgument * Use urlForCommandLine at appropreate places. * Resolve secret params on post commit hook. * Adding secret param support for material password. * Resolve secret params for materials before build assignment to agent * Changed secret param template to `${SECRET[][]}` from '#{SECRET[][]}` * Removed deadcode. * Changed Secrets params format to '{{SECRET:[][]}}' * Always parse the password configured in material * Fixed few test failures
link to issue #6014
UrlArgument
to support originalValue, urlForCommandLine and forDisplay.#{SECRET[][]}
to{{SECRET:[][]}}