Update .gitlab-ci.yml file
This commit is contained in:
parent
c47cf8b220
commit
79dee8de38
|
@ -26,11 +26,8 @@ test-job: # This job runs in the test stage.
|
||||||
script:
|
script:
|
||||||
- |+
|
- |+
|
||||||
echo Recherche de zones à tester
|
echo Recherche de zones à tester
|
||||||
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)
|
files=$(find . -name "*.zone" -printf "%P ")
|
||||||
if [[ ! -z "$CI_RELOAD" || "$files" =~ .*"gitlab-ci.yml".* ]]
|
|
||||||
then
|
|
||||||
files=$(find . -name "*.zone" -printf "%P ")
|
|
||||||
fi
|
|
||||||
if [[ "$files" =~ .*"zone".* ]]
|
if [[ "$files" =~ .*"zone".* ]]
|
||||||
then
|
then
|
||||||
echo "Test des zones $files."
|
echo "Test des zones $files."
|
||||||
|
@ -53,11 +50,7 @@ deploy-job: # This job runs in the deploy stage.
|
||||||
script:
|
script:
|
||||||
- |+
|
- |+
|
||||||
echo Recherche de zones à déployer
|
echo Recherche de zones à déployer
|
||||||
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)
|
files=$(find . -name "*.zone" -printf "%P ")
|
||||||
if [[ ! -z "$CI_RELOAD" || "$files" =~ .*"gitlab-ci.yml".* ]]
|
|
||||||
then
|
|
||||||
files=$(find . -name "*.zone" -printf "%P ")
|
|
||||||
fi
|
|
||||||
|
|
||||||
- echo "Déploiement des zones $files..."
|
- echo "Déploiement des zones $files..."
|
||||||
- |+
|
- |+
|
||||||
|
@ -77,11 +70,7 @@ check-job: # This job runs in the deploy stage.
|
||||||
script:
|
script:
|
||||||
- |+
|
- |+
|
||||||
echo Recherche de zones déployées
|
echo Recherche de zones déployées
|
||||||
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)
|
files=$(find . -name "*.zone" -printf "%P ")
|
||||||
if [[ ! -z "$CI_RELOAD" || "$files" =~ .*"gitlab-ci.yml".* ]]
|
|
||||||
then
|
|
||||||
files=$(find . -name "*.zone" -printf "%P ")
|
|
||||||
fi
|
|
||||||
|
|
||||||
count=$(echo $files | tr "\n" " " | wc -w)
|
count=$(echo $files | tr "\n" " " | wc -w)
|
||||||
linecount=$(( count * 5 + 3))
|
linecount=$(( count * 5 + 3))
|
||||||
|
@ -91,4 +80,4 @@ check-job: # This job runs in the deploy stage.
|
||||||
- sudo grep named /var/log/syslog | tail -n $linecount | grep "reloading zones succeeded" || exit 5
|
- sudo grep named /var/log/syslog | tail -n $linecount | grep "reloading zones succeeded" || exit 5
|
||||||
- sudo grep named /var/log/syslog | tail -n $linecount | grep "all zones loaded" || exit 6
|
- sudo grep named /var/log/syslog | tail -n $linecount | grep "all zones loaded" || exit 6
|
||||||
- sudo grep named /var/log/syslog | tail -n $linecount | grep "running" || exit 7
|
- sudo grep named /var/log/syslog | tail -n $linecount | grep "running" || exit 7
|
||||||
- echo "Déploiement terminé."
|
- echo "Déploiement terminé."
|
Loading…
Reference in New Issue