Update .gitlab-ci.yml file
This commit is contained in:
parent
706c2c5052
commit
73111c21a2
|
@ -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..."
|
||||||
|
|
Loading…
Reference in New Issue