factor out supporting shell scripts from CI configs

We should create some support shell scripts that factor out shared command sequences from our CI configs. This will make it easier to keep configurations for different CI platforms in sync.