Update .gitlab-ci.yml file
This commit is contained in:
parent
4190ef4a8c
commit
088d030fe8
|
@ -21,14 +21,19 @@ synchro-et-tests:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- |+
|
- |+
|
||||||
# Sync files
|
# Sync files with server
|
||||||
rsync -avzlh * /home/webmaster/site-chalec.org/articles/
|
rsync -avzlh * /home/webmaster/site-chalec.org/articles/
|
||||||
- |+
|
- |+
|
||||||
# Check how many changed
|
# Check how many changed
|
||||||
|
echo "Fichiers commités : $(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)"
|
||||||
files=""
|
files=""
|
||||||
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA | grep stl || find . -name "*.stl")
|
if [ -z "$CI_COMMIT_SHA" ]; then
|
||||||
if [ -z "$CI_COMMIT_SHA" ]; then files=$(find . -name "*.stl"); fi
|
files=$(find . -name "*.stl" -printf %P)
|
||||||
|
else
|
||||||
|
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA | grep stl || find . -name "*.stl" -printf "%P\n")
|
||||||
|
fi
|
||||||
echo -e "Test de : \n $files"
|
echo -e "Test de : \n $files"
|
||||||
|
|
||||||
- cd /home/webmaster/site-chalec.org
|
- cd /home/webmaster/site-chalec.org
|
||||||
- |+
|
- |+
|
||||||
# Test for errors
|
# Test for errors
|
||||||
|
@ -54,10 +59,15 @@ 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:
|
||||||
- |+
|
- |+
|
||||||
# Check how many files to be builded
|
# Check how many changed
|
||||||
|
echo "Fichiers commités : $(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)"
|
||||||
files=""
|
files=""
|
||||||
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA | grep stl || find . -name "*.stl")
|
if [ -z "$CI_COMMIT_SHA" ] ; then
|
||||||
if [ -z "$CI_COMMIT_SHA" ]; then files=$(find . -name "*.stl"); fi
|
files=$(find . -name "*.stl" -printf %P)
|
||||||
|
else
|
||||||
|
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA | grep stl || find . -name "*.stl" -printf "%P\n")
|
||||||
|
fi
|
||||||
|
echo -e "Test de : \n $files"
|
||||||
- cd /home/webmaster/site-chalec.org
|
- cd /home/webmaster/site-chalec.org
|
||||||
- |+
|
- |+
|
||||||
# Build and check for errors
|
# Build and check for errors
|
||||||
|
|
Loading…
Reference in New Issue