Merge branch 'master' of git.a-lec.org:a-lec/commissions/infrastructure/www
This commit is contained in:
commit
9ba5ac6b16
|
@ -20,14 +20,18 @@ stages: # List of stages for jobs, and their order of execution
|
||||||
synchro-et-tests:
|
synchro-et-tests:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- rsync -avzlh * /home/webmaster/site-a-lec.org/articles/
|
- |+
|
||||||
|
# Sync files
|
||||||
|
rsync -avzlh * /home/webmaster/site-a-lec.org/articles/
|
||||||
- |+
|
- |+
|
||||||
|
# Check how many changed
|
||||||
files=""
|
files=""
|
||||||
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA | grep stl || find . -name "*.stl")
|
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"); fi
|
||||||
echo -e "Test de : \n $files"
|
echo -e "Test de : \n $files"
|
||||||
- cd /home/webmaster/site-a-lec.org
|
- cd /home/webmaster/site-a-lec.org
|
||||||
- |+
|
- |+
|
||||||
|
# Test for errors
|
||||||
errors=0
|
errors=0
|
||||||
for file in $files
|
for file in $files
|
||||||
do
|
do
|
||||||
|
@ -50,11 +54,13 @@ 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
|
||||||
files=""
|
files=""
|
||||||
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA | grep stl || find . -name "*.stl")
|
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"); fi
|
||||||
- cd /home/webmaster/site-a-lec.org
|
- cd /home/webmaster/site-a-lec.org
|
||||||
- |+
|
- |+
|
||||||
|
# Build and check for errors
|
||||||
errors=0
|
errors=0
|
||||||
for file in $files
|
for file in $files
|
||||||
do
|
do
|
||||||
|
|
Loading…
Reference in New Issue