Update .gitlab-ci.yml file
This commit is contained in:
parent
8ca7fb93cc
commit
07f06cbc9c
|
@ -21,15 +21,19 @@ synchro-et-tests:
|
|||
stage: build
|
||||
script:
|
||||
- |+
|
||||
# Sync files
|
||||
# Sync files with server
|
||||
rsync -avzlh * /home/webmaster/site-a-lec.org/articles/
|
||||
- |+
|
||||
# Check how many changed
|
||||
echo "Fichiers commités : $(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)"
|
||||
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 files=$(find . -name "*.stl"); fi
|
||||
if [ -z "$CI_COMMIT_SHA" ]; then
|
||||
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)
|
||||
fi
|
||||
echo -e "Test de : \n $files"
|
||||
|
||||
- cd /home/webmaster/site-a-lec.org
|
||||
- |+
|
||||
# Test for errors
|
||||
|
@ -55,11 +59,15 @@ deploiement: # This job runs in the deploy stage.
|
|||
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
|
||||
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=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA | grep stl || find . -name "*.stl")
|
||||
if [ -z "$CI_COMMIT_SHA" ]; then files=$(find . -name "*.stl"); fi
|
||||
if [ -z "$CI_COMMIT_SHA" ] ; then
|
||||
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)
|
||||
fi
|
||||
echo -e "Test de : \n $files"
|
||||
- cd /home/webmaster/site-a-lec.org
|
||||
- |+
|
||||
# Build and check for errors
|
||||
|
|
Loading…
Reference in New Issue