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

Add env function similar to consul-template #225

Merged
merged 3 commits into from
Aug 13, 2018

Conversation

aaronhurt
Copy link
Contributor

No description provided.

Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

thanks @leprechau; it lgtm but I am just curious about the dirstate binary files?

@aaronhurt
Copy link
Contributor Author

@jrasell It's a mercurial file (https://www.mercurial-scm.org/wiki/DirState). I think GoLand indexed that directory and wrote the dirstate. I'll add that to the ignore.

@aaronhurt
Copy link
Contributor Author

So I'm not sure I should ignore those files ... they are part of the mercurial structure along with the cache folder. Since the entire vendor directory is checked into the repo the contents of the dirstate and cache folder may change anytime someone indexes those files. What do you want to do?

@aaronhurt
Copy link
Contributor Author

aaronhurt commented Aug 13, 2018

For instance, my current git status looks like this ...

ahurt1:levant ahurt$ git status
On branch feature/add-env-func
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	.idea/
	vendor/github.com/hashicorp/go-getter/test-fixtures/basic-hg/.hg/cache/checkisexec
	vendor/github.com/hashicorp/go-getter/test-fixtures/basic-hg/.hg/cache/checklink
	vendor/github.com/hashicorp/go-getter/test-fixtures/basic-hg/.hg/cache/checklink-target
	vendor/github.com/hashicorp/go-getter/test-fixtures/basic-hg/.hg/cache/checknoexec
	vendor/github.com/hashicorp/go-getter/test-fixtures/basic-hg/.hg/cache/tags2-visible
	vendor/github.com/hashicorp/terraform/config/module/test-fixtures/basic-hg/.hg/cache/checkisexec
	vendor/github.com/hashicorp/terraform/config/module/test-fixtures/basic-hg/.hg/cache/checklink
	vendor/github.com/hashicorp/terraform/config/module/test-fixtures/basic-hg/.hg/cache/checklink-target
	vendor/github.com/hashicorp/terraform/config/module/test-fixtures/basic-hg/.hg/cache/checknoexec
	vendor/github.com/hashicorp/terraform/config/module/test-fixtures/basic-hg/.hg/cache/tags2-visible

nothing added to commit but untracked files present (use "git add" to track)

The reason the dirstate files showed as changed is they are already in the git history and the cache/* files were not. I guess a flat ignore of the vendor/*/.hg/* structure would be fine for most people. Then if/when you actually wanted to modify that content you could explicitly add it to the revision history.

@jrasell
Copy link
Member

jrasell commented Aug 13, 2018

@leprechau I have never used mercurial so can't really comment but I would have a preference for avoiding these files as if they are just caching files they shouldn't be required.

@aaronhurt
Copy link
Contributor Author

Okay, I ignored the vendor/*/.hg/* structure and reverted the dirstate files back to the master revision.

@stevenscg
Copy link

@leprechau Do you have some examples / use cases that you can include for this? I'm mostly looking for inspiration on how to use it.

@jrasell jrasell merged commit 30bae47 into hashicorp:master Aug 13, 2018
@aaronhurt
Copy link
Contributor Author

@stevenscg our use case is executing levant from within our Bamboo build system and using the exported environment variables from the build plan.

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

3 participants