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

allow leading slash for variables in manifest files while using vars-store file #300

Merged
merged 3 commits into from Aug 30, 2017

Conversation

iamNoah1
Copy link

Currently the BOSH CLI doesn't allow to reference variables with leading slashes, i.e. ((/foo)) when using a vars-store file. It is only allowed when using credhub instead of vars-file. In our use case we want to provide manifest files which can be deployed using credhub as well as using the vars-store file.

@cfdreddbot
Copy link

Hey MeBNoah!

Thanks for submitting this pull request!

All pull request submitters and commit authors must have a Contributor License Agreement (CLA) on-file with us. Please sign the appropriate CLA (individual or corporate).

When sending signed CLA please provide your github username in case of individual CLA or the list of github usernames that can make pull requests on behalf of your organization.

If you are confident that you're covered under a Corporate CLA, please make sure you've publicized your membership in the appropriate Github Org, per these instructions.

Once you've publicized your membership, one of the owners of this repository can close and reopen this pull request, and dreddbot will take another look.

@iamNoah1 iamNoah1 closed this Aug 21, 2017
@iamNoah1 iamNoah1 reopened this Aug 21, 2017
@cfdreddbot
Copy link

Hey MeBNoah!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

@@ -21,6 +21,15 @@ var _ = Describe("Template", func() {
Expect(result).To(Equal([]byte("foo\n")))
})

It("can interpolate values with leading slash into a struct with byte slice", func() {
template := NewTemplate([]byte("((/key))"))
Copy link
Contributor

Choose a reason for hiding this comment

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

do you mind changing it to /key/foo?

Copy link
Author

Choose a reason for hiding this comment

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

of course not ;) ... already done

@@ -87,7 +87,7 @@ func (t Template) interpolateRoot(obj interface{}, tracker varsTracker) (interfa
type interpolator struct{}

var (
interpolationRegex = regexp.MustCompile(`\(\((!?[-\.\w\pL]+)\)\)`)
interpolationRegex = regexp.MustCompile(`\(\((!?[-\/\.\w\pL]+)\)\)`)
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor, but the forward slash doesn't need to be escaped. Maybe merger can change it if it isn't already changed.

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.

None yet

5 participants