-
I use environment variables in my configuration that is provided by our CI job. How can I make sure these are set properly when running locally? |
Beta Was this translation helpful? Give feedback.
Answered by
kaos
Nov 24, 2022
Replies: 1 comment 1 reply
-
By using a Example: # .pants.bootstrap
# Ensure GIT_COMMIT is set and exported
: ${GIT_COMMIT:=$(git rev-parse HEAD)}
export GIT_COMMIT
# ... Make sure you have these lines in your |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
kaos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
By using a
.pants.bootstrap
shell script, it will be sourced before invoking your Pants command so any environment variables that needs to be set or other functionality you need to happen for each call to./pants
may be placed into that file.Example:
Make sure you have these lines in your
./pants
script. If not you need to update your local./pants
script first ;)