Debugging Expeditor Actions

To maximize safety and security, Expeditor executes your bash actions inside a Docker container. The Docker image used to launch this container is what gives you the various helper functions. It is likely that in your time using Expeditor you’ll need to debug your script locally. This document will help you understand what steps are required to do this, as well as walk you through a few patterns you can use to maximize your usage of Expeditor.

Executing the script locally

The helper functions you use are not available outside of the Expeditor Docker image. If you want to debug your scripts locally, you can use this command:

$ docker run --rm --volume $(PWD):/workspace --workdir /workspace --env DEBUG=true chefes/lita-worker .expeditor/my-script.sh

Running this command will allow you to execute your script in an environment that contains all of your helper functions. The --env DEBUG=true parameter will ensure that any ceval commands simply echo their values instead of evaluating.

None of the credentials (GitHub, Habitat, Docker, AWS, etc) that are available in Expeditor are available when you run the container locally. You will need to inject your own credentials via --volume or --env as appropriate.