Skip to content

Instantly share code, notes, and snippets.

@jd
Last active March 5, 2020 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jd/2e0609d3d8e6b9519e01d87d8264d142 to your computer and use it in GitHub Desktop.
Save jd/2e0609d3d8e6b9519e01d87d8264d142 to your computer and use it in GitHub Desktop.
Running a CircleCI job on your machine with config format 2.1
function ccijob
{
# Tempfile must be in the repository
local tmpfile="$(mktemp .circleci/config.processed.XXXXXX)"
circleci config process .circleci/config.yml > "$tmpfile"
if [ $? = 0 ]
then
circleci local execute --config "$tmpfile" --job "$1"
fi
rm "$tmpfile"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment