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 direnv support with boilerplate #2175

Closed
wants to merge 1 commit into from

Conversation

vdemeester
Copy link
Member

@vdemeester vdemeester commented Nov 14, 2023

Changes

This add a .envrc file that will be used by direnv to setup the environment for the project if direnv is enabled. It also adds a .env.sample to give an example of what it could be useful for. And it adds .env to gitignore to make sure people do not commit their specific environment configurations.

/cc @tektoncd/cli-maintainers

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Run the code checkers with make check
  • Regenerate the manpages, docs and go formatting with make generated
  • Commit messages follow commit message best practices

See the contribution guide
for more details.

Release Notes

NONE

This add a .envrc file that will be used by direnv to setup the
environment for the project if `direnv` is enabled. It also adds a
`.env.sample` to give an example of what it could be useful for.
And it adds `.env` to gitignore to make sure people do not commit
their specific environment configurations.

Signed-off-by: Vincent Demeester <[email protected]>
@tekton-robot tekton-robot requested a review from a team November 14, 2023 15:34
@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Nov 14, 2023
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from vdemeester after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 14, 2023
@chmouel
Copy link
Member

chmouel commented Nov 14, 2023

I already have a .envrc for some of my specific things on cli, and why this needs to be in repo ?

@vdemeester
Copy link
Member Author

I already have a .envrc for some of my specific things on cli, and why this needs to be in repo ?

Could it move in the .env file ? The main idea is to, possibly, share some .envrc setup where it make sense, and allow users, through the .env file, to set their own.

@chmouel
Copy link
Member

chmouel commented Nov 14, 2023

what kind of shared task do you have in mind?

isn't pre-commit something more appropriate if it's lint/checks/code related?

@vdemeester
Copy link
Member Author

what kind of shared task do you have in mind?

isn't pre-commit something more appropriate if it's lint/checks/code related?

pre-commit is, imo, a tad different (and orthogonal to this), although .envrc could be use to make sure pre-commit is setup if available (so this would be one "shared" task of the .envrc). The .envrc is definitely not for any checks, it's to "help" setup the development environment the best (if enabled) and automatically.

@vdemeester
Copy link
Member Author

@chmouel for example, #2176

@chmouel
Copy link
Member

chmouel commented Nov 15, 2023

We discussed this a bit offline and it's probably a bad idea for security (since it bypass the direnv allow model) and make it a bit awkward for folks that already have their own .envrc

@vdemeester vdemeester closed this Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesnt merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants