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
|
||||
do
|
||||
domain=$(echo $file | sed "s/.zone//g")
|
||||
/usr/sbin/named-checkzone "$domain" "$file"
|
||||
if [[ "$file" =~ .*"zone".* ]]
|
||||
then
|
||||
domain=$(echo $file | sed "s/.zone//g")
|
||||
/usr/sbin/named-checkzone "$domain" "$file" || exit 2
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "Pas de fichier de zone à tester"
|
||||
|
@ -49,11 +52,10 @@ deploy-job: # This job runs in the deploy stage.
|
|||
script:
|
||||
- |+
|
||||
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
|
||||
files=$(find . -name "*.zone" -printf %P)
|
||||
else
|
||||
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)
|
||||
files=$(find . -name "*.zone" -printf "%P ")
|
||||
fi
|
||||
|
||||
- echo "Déploiement des zones $files..."
|
||||
|
|
Loading…
Reference in New Issue