-
Notifications
You must be signed in to change notification settings - Fork 82
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
Update simple-smoke-test
to check Hazelcast version [DI-163]
#776
Update simple-smoke-test
to check Hazelcast version [DI-163]
#776
Conversation
Also refactors `simple-smoke-test` to aid readability now it's got a bit larger. Merging into `use-snapshot-internal-repository`, not `master`, because that centralises `HZ_VERSION`, which ensures it's also available for these steps.
echo "Checking if $image is EE" | ||
if docker run --rm $image bash -c 'compgen -G lib/*enterprise*'; then | ||
echo "Checking if ${image} is EE" | ||
if docker run --rm "${image}" bash -c 'compgen -G lib/*enterprise*'; then |
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.
Why without brackets?
if docker run --rm "${image}" bash -c 'compgen -G lib/*enterprise*'; then | |
if [ docker run --rm "${image}" bash -c 'compgen -G lib/*enterprise*' ]; then |
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.
Why without brackets?
Spellcheck didn't like it as it was. What's the difference?
E.G. https://www.shellcheck.net
#!/usr/bin/env bash
if [ docker run ]; then
echo "EE contents identified"
fi
Co-authored-by: Łukasz Dziedziul <lukasz.dziedziul@hazelcast.com>
…n-sync-with-actual-contents-of-the-distribution' of https://github.com/hazelcast/hazelcast-docker into DI-163---Add-tests-verifying-that-docker-metadata-are-in-sync-with-actual-contents-of-the-distribution
…ts-verifying-that-docker-metadata-are-in-sync-with-actual-contents-of-the-distribution
…etadata-are-in-sync-with-actual-contents-of-the-distribution
…etadata-are-in-sync-with-actual-contents-of-the-distribution
Fix PR desc Spellcheck --> Shellcheck (may be add link) |
I genuinely thought it was Spellcheck 🤦 |
In hazelcast/hazelcast-docker#776, additional checks were added to `hazelcast-docker`'s tests to assert variant and version. Rather than duplicate these tests, here, instead refactored those tests so that the logic can be shared - hazelcast/hazelcast-docker#790 This PR adapts these tests to use this framework, giving additional validation: - variant and version - `CLC` can connect to `IMap` in instance
…z] (#791) Backport of: - 114d45d - #747 - #754 - #756 - #765 - #768 - #766 - #772 - #774 - #776 - #775 I suggest to review it commit-by-commit `SNAPSHOT` OS distribution ZIPs (e.g. [those indexed here](https://oss.sonatype.org/content/repositories/snapshots/com/hazelcast/hazelcast-distribution/5.4.0-SNAPSHOT)) will no longer be generated, which causes problems with the `hazelcast-docker` PR builder (amongst others). Instead, the distribution ZIPs will be uploaded to a private AWS S3 bucket, which requires authentication. **This was a non-trivial change**: - Updated the default distribution in the Docker images to be the latest released version - This is guaranteed to be available (without any credentials) - Allows the `Dockerfile` to be executed normally outside of a build (e.g. for the security scan) - "latest released" is looked up via Maven to ensure this doesn't need any explicit maintenance in future - Added unit tests to all modified shell scripts - Moved `get_hz_dist_zip` into `os_build.functions` (and same for EE) - Created additional `maven.functions` script to support resolution of "latest released" for a given artifact - This has to be duplicated for OS & EE because of Docker limitations - Added `xmllint` to all the runner images that build anything as required for the Maven stuff - Updated the `get_dist` OS script to generate a pre-signed S3 URL to get it from S3 rather than a Maven repository - Because this requires authentication, had to move this from inside the image to outside to access the repository secrets - Simplified the `Dockerfile` arguments - the URL resolution is now being done outside of the `Dockerfile` more of the time, meaning not always required - removed the redundant `HZ_VARIANT` parameter - removed `HZ_VERSION` from OS and reduced usage in EE For testing, I've been doing what I can locally to assert the results between `master` and my branch are the same: - E.G. the `build-pr.yml` doesn't pass locally for me on EE, I presume due to some `act` incompatibility - so a milestone for my PR is to get the same failure in the same place - I've build the images locally (outside of `act`, just a plain `docker buildx build hazelcast-os`) and they build ok. - Because of the reliance on repository secrets, it's not possible to run many tests properly Fixes: [DI-95](https://hazelcast.atlassian.net/browse/DI-95) [DI-210](https://hazelcast.atlassian.net/browse/DI-210) [DI-95]: https://hazelcast.atlassian.net/browse/DI-95?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [DI-95]: https://hazelcast.atlassian.net/browse/DI-95?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Jack Green <jack.green@hazelcast.com>
…z] (#789) Backport of: - #747 - #754 - #756 - #765 - #768 - #766 - #772 - #774 - #776 - #775 I suggest to review it commit-by-commit `SNAPSHOT` OS distribution ZIPs (e.g. [those indexed here](https://oss.sonatype.org/content/repositories/snapshots/com/hazelcast/hazelcast-distribution/5.4.0-SNAPSHOT)) will no longer be generated, which causes problems with the `hazelcast-docker` PR builder (amongst others). Instead, the distribution ZIPs will be uploaded to a private AWS S3 bucket, which requires authentication. **This was a non-trivial change**: - Updated the default distribution in the Docker images to be the latest released version - This is guaranteed to be available (without any credentials) - Allows the `Dockerfile` to be executed normally outside of a build (e.g. for the security scan) - "latest released" is looked up via Maven to ensure this doesn't need any explicit maintenance in future - Added unit tests to all modified shell scripts - Moved `get_hz_dist_zip` into `os_build.functions` (and same for EE) - Created additional `maven.functions` script to support resolution of "latest released" for a given artifact - This has to be duplicated for OS & EE because of Docker limitations - Added `xmllint` to all the runner images that build anything as required for the Maven stuff - Updated the `get_dist` OS script to generate a pre-signed S3 URL to get it from S3 rather than a Maven repository - Because this requires authentication, had to move this from inside the image to outside to access the repository secrets - Simplified the `Dockerfile` arguments - the URL resolution is now being done outside of the `Dockerfile` more of the time, meaning not always required - removed the redundant `HZ_VARIANT` parameter - removed `HZ_VERSION` from OS and reduced usage in EE For testing, I've been doing what I can locally to assert the results between `master` and my branch are the same: - E.G. the `build-pr.yml` doesn't pass locally for me on EE, I presume due to some `act` incompatibility - so a milestone for my PR is to get the same failure in the same place - I've build the images locally (outside of `act`, just a plain `docker buildx build hazelcast-os`) and they build ok. - Because of the reliance on repository secrets, it's not possible to run many tests properly Fixes: [DI-95](https://hazelcast.atlassian.net/browse/DI-95) [DI-210](https://hazelcast.atlassian.net/browse/DI-210) [DI-95]: https://hazelcast.atlassian.net/browse/DI-95?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [DI-95]: https://hazelcast.atlassian.net/browse/DI-95?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Jack Green <jack.green@hazelcast.com>
) In hazelcast/hazelcast-docker#776, additional checks were added to `hazelcast-docker`'s tests to assert variant and version. Rather than duplicate these tests, here, instead refactored those tests so that the logic can be shared - hazelcast/hazelcast-docker#790 This PR adapts these tests to use this framework, giving additional validation: - variant and version - `CLC` can connect to `IMap` in instance Fixes: [DI-215](https://hazelcast.atlassian.net/browse/DI-215) [DI-215]: https://hazelcast.atlassian.net/browse/DI-215?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
simple-smoke-test
Fixes: DI-163