Merge branch 'master' of git.a-lec.org:a-lec/commissions/chalec/www
This commit is contained in:
commit
32364eff6b
|
@ -21,35 +21,35 @@ synchro-et-tests:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- rsync -avzlh * /home/webmaster/site-chalec.org/articles/
|
- rsync -avzlh * /home/webmaster/site-chalec.org/articles/
|
||||||
- files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA|grep stl || ls *.stl)
|
- |+
|
||||||
|
files=""
|
||||||
|
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA | grep stl || ls *.stl)
|
||||||
- cd /home/webmaster/site-chalec.org
|
- cd /home/webmaster/site-chalec.org
|
||||||
- |+
|
- |+
|
||||||
errors=
|
errors=0
|
||||||
for file in $files
|
for file in $files
|
||||||
do
|
do
|
||||||
echo "Test de $file"
|
echo "Test de $file"
|
||||||
stl check $file
|
stl check $file | grep Err && errors=$((errors+1)) # error if err is read in standard output
|
||||||
errors=$errors"\n"$(stl check $file | grep Err) # return false if error is read in standard output
|
|
||||||
done
|
done
|
||||||
echo "Récapitulatif des erreurs"
|
[ $errors -gt 0 ] && false
|
||||||
echo -e $errors | grep Err && false
|
|
||||||
- echo "Fin des tests."
|
- echo "Fin des tests."
|
||||||
|
|
||||||
|
|
||||||
deploiement: # This job runs in the deploy stage.
|
deploiement: # 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|grep stl || ls *.stl)
|
- |+
|
||||||
|
files=""
|
||||||
|
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA | grep stl || ls *.stl)
|
||||||
- cd /home/webmaster/site-chalec.org
|
- cd /home/webmaster/site-chalec.org
|
||||||
- |+
|
- |+
|
||||||
errors=
|
errors=""
|
||||||
for file in $files
|
for file in $files
|
||||||
do
|
do
|
||||||
echo "Construction de $file"
|
echo "Construction de $file"
|
||||||
stl wip $file
|
stl wip $file | grep Err && errors=$((errors+1)) # error if err is read in standard output
|
||||||
errors=$errors"\n"$(stl wip $file | grep Err) # return false if error is read in standard output
|
|
||||||
done
|
done
|
||||||
echo "Récapitulatif des erreurs"
|
[ $errors -gt 0 ] && false
|
||||||
echo -e $errors | grep Err && false
|
|
||||||
- stl sync
|
- stl sync
|
||||||
- echo "Déploiement terminé."
|
- echo "Déploiement terminé."
|
Loading…
Reference in New Issue