|
|
@ -8,6 +8,11 @@ if [ "$GIT_TUTOR" ] ; then |
|
|
|
REPO=${GIT_TUTOR##*/} |
|
|
|
REPO=${REPO%.git} |
|
|
|
|
|
|
|
|
|
|
|
PIPELINENAME=$(echo $TASKNAME | cut -d'.' -f1) |
|
|
|
|
|
|
|
SESSION=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8 ; echo '') |
|
|
|
|
|
|
|
# --------------------------- |
|
|
|
# start playground |
|
|
|
# -------------------------- |
|
|
@ -25,16 +30,16 @@ chmod +x /home/$USER/crond/playground-start.sh |
|
|
|
read -r -d '' VAR <<EOF |
|
|
|
module.exports = { |
|
|
|
"apps": [{ |
|
|
|
"name" : "playground-nodejs", |
|
|
|
"name" : "playground-nodejs-$PIPELINENAME", |
|
|
|
"autorestart" : true, |
|
|
|
"watch" : true, |
|
|
|
"script" : "/home/$USER/$REPO/swarmlab-app/src/run/app.js", |
|
|
|
"args" : "start", |
|
|
|
"pid_file" : "/home/$USER/run/pid.pid", |
|
|
|
"log_type" : "json", |
|
|
|
"log_file" : "/home/$USER/log/logfile", |
|
|
|
"error_file" : "/home/$USER/log/errorfile", |
|
|
|
"out_file" : "/home/$USER/log/outfile", |
|
|
|
"log_file" : "/home/$USER/log/$PIPELINENAME-$SESSION-log", |
|
|
|
"error_file" : "/home/$USER/log/$PIPELINENAME-$SESSION-error", |
|
|
|
"out_file" : "/home/$USER/log/$PIPELINENAME-$SESSION-output", |
|
|
|
"log_date_format": "YYYY-MM-DD HH:mm Z", |
|
|
|
"env" : { |
|
|
|
"NODE_PATH": "/home/$USER/$REPO/swarmlab-app/src/node_modules", |
|
|
|