Scripting the puppet-code command

The puppet-code command can deploy environments from the command line. You can use this command in custom Code Manager scripts.

Using puppet-code in Code Manager scripts is much the same as Triggering Code Manager on the command line. The benefit to using a script is that you don't need to rebuild the commands from scratch each time, since they are stored in scripts.

Build your desired puppet-code command with the relevant action, environment (or --all for all environments), custom puppet-code.conf settings, and other options. Then, incorporate the command into your complete script.

After pushing new code to your control repo, run your script to trigger Code Manager to deploy your code.