04.05.2015 Views

Versioning Infrastructure Michael Mirman - Perforce

Versioning Infrastructure Michael Mirman - Perforce

Versioning Infrastructure Michael Mirman - Perforce

SHOW MORE
SHOW LESS

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

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!