Refactor : Surcharge des registries ghcr et docker et gestion conditionnelle de Nexus#63
Open
benji78 wants to merge 2 commits into
Open
Conversation
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.
Quel est le comportement actuel ?
Les URLs des registries (ex:
ghcr.io,docker.io) sont hard codés dans chaque fichier CI (kaniko-ci.yml,mirror.yml,sonar-ci.yml,vault-ci.yml).La récupération des identifiants Nexus dans
vault-ci.ymlest non conditionnelle : si le chemin/NEXUSn'existe pas dans Vault, le pipeline échoue.Quel est le nouveau comportement ?
Surcharge des registries :
Les variables globales (
GHCR_REGISTRY,DOCKER_REGISTRY) sont définies en haut de chaque fichier CI et utilisées pour surcharger les URLs des registries.Cela permet de centraliser la configuration et d'utiliser un autre registry sans introduire de breaking changes (les valeurs par défaut restent identiques).
Gestion conditionnelle de Nexus :
Dans
vault-ci.yml, la récupération des identifiants Nexus est désormais conditionnelle :/NEXUSdans Vault avant toute tentative de récupération.${VAR:-}).Nettoyage mineur :
Suppression des espaces superflus (formatage automatique).
Cette PR introduit-elle un breaking change ?
Non :
ghcr.io,docker.io) restent inchangées./NEXUSexiste, le comportement est identique à avant.Autres informations
Aujourd'hui la console offre la possibilité de désactiver le "plugin" Nexus, mais le job vault-ci ne passe pas en l'absence du chemin
/NEXUSdans l'espace Vault du projet qui est créé uniquement avec ce plugin.