-
Notifications
You must be signed in to change notification settings - Fork 361
Add support to build docker image with eclipselink #227
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
Conversation
| usage() { | ||
| echo "Usage: $0 [-e true|false] [-h]" | ||
| echo " -e Set the ECLIPSELINK flag (default: false)" | ||
| echo " -h Display this help message" | ||
| exit 1 | ||
| } |
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.
This change is one I'm a little unsure about. Things like metastore manager and callcontext resolver are designed to be pluggable and discoverable by DropWizard.
I'm worried about the precedent this sets and whether we would want to add all these as myriad options here. The script might get quite complicated in order to cover every combination.
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.
With this concern, should we move those into a config file instead?
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.
Or maybe just a safety valve type flag that allows you to pass an arbitrary build arg down to docker build?
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.
K, let me think about it tonight then submit another PR to address those tonight.
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.
@eric-maynard updated with arbitrary build arg support. Please take another look when you get a chance.
Helper message:
Usage: run.sh [-b build-arg1=value1,build-arg2=value2,...] [-h]
-b Pass a set of arbitrary build arguments to docker build, separated by commas
-h Display this help message
Default run:
bash run.sh
Arbitrary build arg run:
bash run.sh -b ECLIPSELINK=true
# sample output:
# Building polaris image with build arguments: --build-arg ECLIPSELINK=true
Arbitrary build args run:
bash run.sh -b ECLIPSELINK=true,RANDOM=true
# sample output:
# Building polaris image with build arguments: --build-arg ECLIPSELINK=true --build-arg RANDOM=true
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.
It would be nice to add a change to the docs specifying how to get this build working. But I don't want to hold the PR up any longer, so maybe post a separate docs PR
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.
I can update those later tonight if not yet merged.
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.
actually lets have it in a diff PR. The current Dockerfile doesn't support eclipseLinkDeps flag. I will add this in and update the doc for both optional options. What do u think?
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.
I'd recommend to add an example like ./run.sh -b ECLIPSELINK=true, as it is probably most commonly used.
run.sh
Outdated
| # build and deploy the server image | ||
| # Check if BUILD_ARGS is not empty and print the build arguments | ||
| if [[ -n "$BUILD_ARGS" ]]; then | ||
| echo "Building polaris image with build arguments:$BUILD_ARGS" |
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.
nit: space missing after :
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.
Took care.
run.sh
Outdated
| echo "Applying kubernetes manifests..." | ||
| kubectl delete -f k8/deployment.yaml --ignore-not-found | ||
| kubectl apply -f k8/deployment.yaml | ||
| kubectl apply -f k8/deployment.yaml |
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.
Missing whitespace at end of file
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.
Took care.
eric-maynard
left a comment
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.
LGTM with some comments on style
|
Anything else needed on this PR? |
|
The license check is currently failing, I don't think this should be happening, can you try rebasing and try again? |
yes. Just noticed it. Was fine earlier. Had being a while since I submitted this PR. The PR had being rebased. |
flyrain
left a comment
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.
+1
|
Thanks @MonkeyCanCode for the PR. Thanks @RussellSpitzer @eric-maynard @collado-mike for the review. |
Description
As #114 added support for building the project with eclipselink via optional flag, this PR is add the same support via optional command line argument to
run.shwhen using mini-deployment locally.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Default:
With optional command line argument:
Helper:
Checklist:
Please delete options that are not relevant.