Skip to content

Instantly share code, notes, and snippets.

@josephpconley
Last active August 29, 2015 14:14
Show Gist options
  • Save josephpconley/e5b559baef9a4ba54c7c to your computer and use it in GitHub Desktop.
Save josephpconley/e5b559baef9a4ba54c7c to your computer and use it in GitHub Desktop.
DIY Continuous Integration - Save this script in DataCombinator and create a repo webhook in Github pointing to that script's POST url (populate variables based on your host info)
api(post, https://api.github.com/repos/{{repository.full_name}}/statuses/{{after}}, 4,
{"state": "pending"}
);
ssh(<host>, <user>, <pass>,
"cd {{repository.name}} && git fetch origin && git checkout {{after}} && sbt test"
);
if(this.exitCode == 0,
api(post, https://api.github.com/repos/{{_.0.repository.full_name}}/statuses/{{_.0.after}}, 4,
{"state": "success"}
),
api(post, https://api.github.com/repos/{{_.0.repository.full_name}}/statuses/{{_.0.after}}, 4,
{"state": "failure"}
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment