Update .gitlab-ci.yml file

This commit is contained in:
Adrien Bourmault 2022-10-11 22:57:52 +00:00
parent 706c2c5052
commit 73111c21a2
1 changed files with 9 additions and 7 deletions

View File

@ -36,8 +36,11 @@ test-job: # This job runs in the test stage.
for file in $files for file in $files
do do
if [[ "$file" =~ .*"zone".* ]]
then
domain=$(echo $file | sed "s/.zone//g") domain=$(echo $file | sed "s/.zone//g")
/usr/sbin/named-checkzone "$domain" "$file" /usr/sbin/named-checkzone "$domain" "$file" || exit 2
fi
done done
else else
echo "Pas de fichier de zone à tester" echo "Pas de fichier de zone à tester"
@ -49,11 +52,10 @@ deploy-job: # This job runs in the deploy stage.
script: script:
- |+ - |+
echo Recherche de zones à déployer echo Recherche de zones à déployer
if [ ! -z "$CI_RELOAD" ]
then
files=$(find . -name "*.zone" -printf %P)
else
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA) files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)
if [[ ! -z "$CI_RELOAD" || "$files" =~ .*"gitlab-ci.yml".* ]]
then
files=$(find . -name "*.zone" -printf "%P ")
fi fi
- echo "Déploiement des zones $files..." - echo "Déploiement des zones $files..."