Repository navigation
Add a smoke test for the app image init script - #56
Merged
Merged
Conversation
CI built and published the app image without ever running its entrypoint, so a change that left init.sh valid but functionally wrong reached the registry with every check green. base.alpine/test.sh runs the image with each init.sh setting and checks the effect. The workflow runs it on both platforms for pull requests and master pushes, before the registry logins; tag builds are unchanged. make test_app runs the same script locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, CI built the app image and, on
masterand tags, published it, without ever runninginit.sh. A change that left the script valid but functionally wrong reached the registry with every check green.After this change,
base.alpine/test.shsmoke-tests the app image entrypoint. It implements option 1 with the requested changes:exec /init.sh, so there is no helper image to build or clean uploadand thebaseimage-app:testtag are set only for the app imagemasterpushes, before the registry logins, on both the amd64 and arm64 legs; onmasteronly the app leg runs the extra local build, and tag builds are unchanged--user 1001 ... id -uand expects exit 0 and the output1001make test_appruns the same script againstumputun/baseimage:app-latest, the tagmake build_appproduces.Checked locally on an image built from this branch: all 18 checks pass. Removing the
/srvand/home/appchowns frominit.shmakes the threeapp:appchecks fail. Letting the root-only setup run as uid 1001 makes the non-root check fail on the timezone errors printed before1001. The script passes shellcheck, and the workflow passes actionlint.Resolves #52