Versioning Infrastructure Michael Mirman - Perforce
Versioning Infrastructure Michael Mirman - Perforce
Versioning Infrastructure Michael Mirman - Perforce
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Deployment of crontabs<br />
§<br />
§<br />
§<br />
§<br />
Use change-commit trigger to install crontab<br />
commit.cron change-commit //depot/crontabs/p4serv/... "install.crontab -p4port<br />
%serverport% -changelist %changelist%"<br />
Crontab files in the depot are //depot/crontabs/userid/host<br />
For every crontab file the trigger retrieves from the change, the<br />
trigger deploys by piping the content to this command:<br />
ssh user@host crontab -<br />
Additional insurance (what if ssh fails?) in every crontab<br />
p4 -p perforce:1666 print -q //depot/crontabs/p4serv/$HOST > /tmp/crontab.$$; [ -s /<br />
tmp/crontab.$$ ] && crontab /tmp/crontab.$$; rm /tmp/crontab.$$<br />
16