Skip to content
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

Merged
merged 3 commits into from
Apr 30, 2018

Conversation

lox
Copy link
Contributor

@lox lox commented Apr 17, 2018

This allows for interpolation to be disabled in buildkite-agent pipeline upload.

Closes #715.

@@ -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{}
Copy link
Member

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?)

Copy link
Contributor Author

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@lox lox requested a review from sj26 April 27, 2018 23:45
@lox
Copy link
Contributor Author

lox commented Apr 27, 2018

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.

Copy link
Member

@keithpitt keithpitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

Copy link
Member

@sj26 sj26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. 👍

@lox lox merged commit b9d4dab into master Apr 30, 2018
@lox lox deleted the pipeline-upload-no-interpolation-arg branch April 30, 2018 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants