-
Notifications
You must be signed in to change notification settings - Fork 79
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
Refactor build env logic to switch between testing and production #604
Refactor build env logic to switch between testing and production #604
Conversation
609f6cd
to
79bfa17
Compare
Signed-off-by: Peter Zhu <[email protected]>
63bf555
to
62eb77d
Compare
Signed-off-by: Peter Zhu <[email protected]>
PLATFORM=${{ matrix.platform }} | ||
PLATFORM=`echo $PLATFORM | tr '/' '-'` | ||
docker buildx build --platform ${{ matrix.platform }} --build-arg BUILD_ENV=testing --build-arg BUILD_DATE=`date -u +%Y-%m-%dT%H:%M:%SZ` -f "docker/Dockerfile" -t "osb/osb-$PLATFORM" -o type=docker . | ||
docker images | grep "osb/osb-$PLATFORM" |
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.
Probably can be streamlined, but fine for testing.
What does the docker images
line do? Is it simply to print the output of the grep
?
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.
Yes @gkamat
It is to setup the next step of running docker container based on the image just created.
In multi-arch build most of the time image has to be pushed upon completion to registry.
I force the image to be saved locally so we can use the image to run containers.
Once the container is up we can use it to run IT.
This is a pre-req before that happens.
And I agree the code can be streamlined a bit, which I will improve in the next iteration.
Thanks.
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.
We need this file for integration tests
Description
Add Docker Run UnitTest on x64 Runner
Issues Resolved
opensearch-project/opensearch-build#4723
Testing
[Describe how this change was tested]
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.