-
Notifications
You must be signed in to change notification settings - Fork 32
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
Check KBASE_TEST_TOKEN env var if no dev token is found #346
Conversation
…est token in the test_local folder
jdk: | ||
- openjdk8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the appropriate JDK is used.
String test_token = System.getenv("KBASE_TEST_TOKEN"); | ||
if (test_token != null && !test_token.trim().isEmpty()) { | ||
tokenString = test_token; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default to using the value in test.cfg
, and check the env var KBASE_TEST_TOKEN
if that value is not set.
I think you will also need to modify the generated kb-sdk scripts that use Docker so that the variable makes it into the container where the sdk tool runs. |
I don't think so, all this happens prior the the entrypoint being called. The token read here winds up in the token file prior to docker being started. |
What I mean is ... I set the token variable in my current (non-docker sdk) shell |
Oh, right, you're talking about the dockerized version of the SDK. I was thinking of the local version, where this would work as is. |
I was intending this for local use, but if you want to add in something to allow it to be used for the dockerised version, go for it. |
Two changes in this PR:
test_local/test.cfg