|
@ -95,7 +95,7 @@ module.exports = { |
|
|
"name" : "playground-nodejs", |
|
|
"name" : "playground-nodejs", |
|
|
"autorestart" : true, |
|
|
"autorestart" : true, |
|
|
"watch" : true, |
|
|
"watch" : true, |
|
|
"script" : "/home/ubuntu/project/tutor/$REPO/swarmlab-app/src/run/app.js", |
|
|
"script" : "/home/ubuntu/project/$REPO/swarmlab-app/src/run/app.js", |
|
|
"args" : "start", |
|
|
"args" : "start", |
|
|
"pid_file" : "/home/ubuntu/run/pid.pid", |
|
|
"pid_file" : "/home/ubuntu/run/pid.pid", |
|
|
"log_type" : "json", |
|
|
"log_type" : "json", |
|
@ -120,12 +120,14 @@ chmod +x /home/ubuntu/crond/playground.config.js |
|
|
read -r -d '' VAR <<EOF |
|
|
read -r -d '' VAR <<EOF |
|
|
#!/bin/bash |
|
|
#!/bin/bash |
|
|
|
|
|
|
|
|
cd /home/ubuntu/project/tutor/$REPO |
|
|
if [ ! -d "$REPO" ] ; then |
|
|
|
|
|
git clone $GIT_TUTOR |
|
|
|
|
|
else |
|
|
|
|
|
cd /home/ubuntu/project/$REPO |
|
|
git fetch origin master |
|
|
git fetch origin master |
|
|
git reset --hard FETCH_HEAD |
|
|
git reset --hard FETCH_HEAD |
|
|
git clean -df |
|
|
git clean -df |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EOF |
|
|
EOF |
|
|
echo "$VAR" > /home/ubuntu/crond/playground-sync.sh |
|
|
echo "$VAR" > /home/ubuntu/crond/playground-sync.sh |
|
|