Update .gitlab-ci.yml file
This commit is contained in:
parent
c0105bd194
commit
f43d1c4c1c
|
@ -24,7 +24,12 @@ test-job: # This job runs in the test stage.
|
||||||
stage: test # It only starts when the job in the build stage completes successfully.
|
stage: test # It only starts when the job in the build stage completes successfully.
|
||||||
script:
|
script:
|
||||||
- |+
|
- |+
|
||||||
|
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)
|
||||||
|
fi
|
||||||
if [[ "$files" =~ .*"zone".* ]]
|
if [[ "$files" =~ .*"zone".* ]]
|
||||||
then
|
then
|
||||||
echo "Test des zones $files."
|
echo "Test des zones $files."
|
||||||
|
@ -36,6 +41,13 @@ test-job: # This job runs in the test stage.
|
||||||
deploy-job: # This job runs in the deploy stage.
|
deploy-job: # This job runs in the deploy stage.
|
||||||
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
|
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
|
||||||
script:
|
script:
|
||||||
- files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)
|
- |+
|
||||||
|
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)
|
||||||
|
fi
|
||||||
|
|
||||||
- echo "Déploiement des zones $files..."
|
- echo "Déploiement des zones $files..."
|
||||||
- echo "Déploiement terminé."
|
- echo "Déploiement terminé."
|
||||||
|
|
Loading…
Reference in New Issue