linux - Jenkins on ISPConfig -


i'm usin ispconfig have multiple domains clients. now, have jenkins deploy specific project.

jenkins has assigned working directory on /var/www/myproject/web virtualhost on ispconfig.

manually have to:

chown -r jenkins:nogroup /var/www/myproject/web > build jenkins project chown -r web38:client17 /var/www/myproject/web 

questions:

  • is ok if grant sudo permissions jenkins?
  • instead of that, should create bash script sudo permissions?
  • is permission role didn't notice properly?

thx

this solution i've found.

install "batch tasks" module on jenkins.

create script follows root:root permissions on /var/www/your_domain.com/jenkins-post-build.sh

#!/bin/bash source=$1 target=$2  echo moving $source $target  rm -rf $target cp -r $source $target ln -s $target/build $target/public/build chown -r web39:client11 $target 

add post build action using "invoke batch tastsk"

sudo /var/www/your_domain.com/jenkins-post-build.sh ${workspace} /var/www/your_domain.com/web 

add script right sudo permissions

cmnd_alias hiper_dev    = /var/www/your_domain.com/jenkins-post-build.sh jenkins all=(all) nopasswd:hiper_dev 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -