-
Notifications
You must be signed in to change notification settings - Fork 300
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 --no-interpolation
option in pipeline upload
#733
Conversation
@@ -32,6 +33,15 @@ func (p PipelineParser) Parse() (interface{}, error) { | |||
errPrefix = fmt.Sprintf("Failed to parse %s", p.Filename) | |||
} | |||
|
|||
// If interpolation is disabled, just parse and return | |||
if p.NoInterpolation { | |||
var result interface{} |
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.
I think we may need to do the same logic as we do on line 50 (with the switch between a slice or a map?)
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 only do that so that we can parseWithEnv
if it's a map. Without interpolation I don't think we need to do that, do we?
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.
Hmmmmm. We might end up with out-of-order env if we do that though.
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.
But we always had that, it only mattered once we started doing interpolation.
Let's get this one merged. I'm pretty sure that short-circuit is ok @keithpitt, as without any interpolation we don't need any of the other fancy parsing bits. |
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.
👌
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.
Nice. 👍
This allows for interpolation to be disabled in
buildkite-agent pipeline upload
.Closes #715.