fix: qualité du code - dev.sh, dockerfile layers, tests (epic #104)#112
Open
bgauduch wants to merge 3 commits into
Open
fix: qualité du code - dev.sh, dockerfile layers, tests (epic #104)#112bgauduch wants to merge 3 commits into
bgauduch wants to merge 3 commits into
Conversation
Replace positional argument parsing with getopts, add -a/-t/-i flags, and validate AWS and Terraform versions against semver regex before use. https://claude.ai/code/session_01RsmDFm6w4jVXwvzmRd9BCv
Merge separate RUN apt-get install calls in the terraform and aws-cli stages into a single RUN with apt-get clean to reduce image layer count. https://claude.ai/code/session_01RsmDFm6w4jVXwvzmRd9BCv
Add commandTests to verify terraform and aws binaries are in PATH, confirm the container runs as nonroot (uid 1001), and that HOME is set. https://claude.ai/code/session_01RsmDFm6w4jVXwvzmRd9BCv
9e2f43d to
de0e39f
Compare
21 tasks
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.
Summary
dev.sh- getopts et validation semver : remplace le parsing positionnel ($1,$2,$3) pargetoptsavec les flags-a(AWS version),-t(TF version),-i(image tag). Ajoute une validation regex semver (X.Y.Z) sur les deux versions avant utilisation. Ajouteset -euo pipefailcomplet (le-umanquait) et untrap ERRpour afficher la ligne d'échec.dev.sh- typo PLATFORM : corrigePLATEFORM→PLATFORMdans le script (variable et commentaire).Dockerfile- consolidation des layers : fusionne les 4–6RUN apt-get installséparés des stagesterraformetaws-clien un seulRUNpar stage avecapt-get clean && rm -rf /var/lib/apt/lists/*. Les versions pinnées sont inchangées.commandTestsdanscontainer-structure-tests.yml.template: vérification queterraformetawssont dansPATH, que l'utilisateur courant estnonroot(uid1001), et que$HOMEvaut/home/nonroot.Test plan
dev.sh -haffiche l'usage correctementdev.sh -a 2.x.y -t 1.x.yparse correctement les argumentsdev.sh -a invalidretourne une erreur semver claireterraformetaws-cliconsolidésCloses #104
https://claude.ai/code/session_01RsmDFm6w4jVXwvzmRd9BCv
Generated by Claude Code