On Thursday, February 14, 2013 2:49:42 PM UTC-6, John Coggeshall wrote: > > Hello all, > > I'm using puppet to deploy my codebase from GIT. I have everything > working, but i currently don't have any way to check to make sure there is > actually something TO deploy before it goes through the entire process of > deploying the code. I want to create a conditional that only re-deploys the > code if the revision actually changed. > > So far, I can have it as part of the deploy process write the contents of > 'git rev-parse HEAD' to a file, this way I can do something like this from > BASH: > > [ `cat git-current-hash` != `git rev-parse HEAD` ] > > which will return true only if there is a new revision to pull. The > question is, how do I conditional include many different file {} and other > things only if that condition is true? If this was just an exec{} I could > use onlyif. > > One option would be to have a post-commit hook or something that pushes the code, instead of polling to pull the code.
> John > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.