on-circle
v2.2.0
Published
Configure and run scripts on CircleCI
Downloads
19
Readme
on-circle
It comes with a command line interface to follow a project, set environment variables and trigger a specific job. It can also be used in a node script to provide a sandboxed environment to execute code on CircleCI.
# Follow the current project to CircleCI
yarn run oncircle follow
# Set an ENV variable
yarn run oncircle setenv API_KEY=4815162342
# Trigger a specific job
yarn run oncircle trigger dailyUpdate
// Run this from a job running on CircleCI
const onCircle = require('on-circle');
await onCircle.run(
async (success, failure, repo }) => {
// Run any custom code here, for example calling
// external APIs to update some data.
// You can even update the repo and push back
// (check https://projects.pixelastic.com/gilmore/ for documentation)
if (everythingIsOk) {
return success('Everything worked');
} else {
return failure('Something is broken');
}
// Oh, and any error will be caught and transformed
// into a GitHub issue
}
});
Documentation
The complete documentation can be found on https://projects.pixelastic.com/on-circle/