$ openssl genrsa -out xxx 4096
$ sudo chmod 600 xxx
$ ssh-keygen -y -f xxx > xxx.pub
$ wget https://raw.githubusercontent.com/ItinerisLtd/lighthouse-keeper/master/src/generate_config.rb
- Edit the
urls
array ingenerate_config.rb
$ ruby generate_config.rb
- Edit
CHANGEME
in the newly generated yaml file
$ curl -X POST --header "Content-Type: application/json" -d '{"branch":"staging"}' https://circleci.com/api/v1.1/project/:vcs-type/:username/:project/build?circle-token=:token
# Example
$ curl -X POST --header "Content-Type: application/json" -d '{"branch":"master"}' https://circleci.com/api/v1.1/project/github/itinerisltd/lighthouse-keeper-demo/build?circle-token=MY-CIRCLE-TOKEN
{
"status" : 200,
"body" : "Build created"
}
Note: You have to trigger the workflow instead of individual jobs.
See: https://circleci.com/docs/api/v1-reference/#new-project-build