Update .gitlab-ci.yml file
This commit is contained in:
parent
706c2c5052
commit
73111c21a2
|
@ -35,9 +35,12 @@ test-job: # This job runs in the test stage.
|
||||||
echo "Test des zones $files."
|
echo "Test des zones $files."
|
||||||
|
|
||||||
for file in $files
|
for file in $files
|
||||||
do
|
do
|
||||||
domain=$(echo $file | sed "s/.zone//g")
|
if [[ "$file" =~ .*"zone".* ]]
|
||||||
/usr/sbin/named-checkzone "$domain" "$file"
|
then
|
||||||
|
domain=$(echo $file | sed "s/.zone//g")
|
||||||
|
/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" ]
|
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)
|
||||||
|
if [[ ! -z "$CI_RELOAD" || "$files" =~ .*"gitlab-ci.yml".* ]]
|
||||||
then
|
then
|
||||||
files=$(find . -name "*.zone" -printf %P)
|
files=$(find . -name "*.zone" -printf "%P ")
|
||||||
else
|
|
||||||
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- echo "Déploiement des zones $files..."
|
- echo "Déploiement des zones $files..."
|
||||||
|
|
Loading…
Reference in New Issue