First, we need to setup our workstation to have a docker image that we can use to mimic codebuild in the wild. For this I’ve setup nodejs, but you can browse the binaries and freely use whichever you want.

Below is a simple list of commands to get setup.

Note to self: scripting this may be useful in the future

Once installed, the usage is actually brilliantly simple:

  1. Your path to artifact is where you want the artifact to be “downloaded” to.
  2. Your buildspec can be named anything as long as it follows the conventions; I typically have buildspec.yml for production, and buildspec-{env} for others, because unfortunately codebuild does not support native environment variables for this yet (if it does and I’m missing it, please point me in the right direction!)