Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/acolorbright/restart-latest-codeship-build
https://github.com/acolorbright/restart-latest-codeship-build
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/acolorbright/restart-latest-codeship-build
- Owner: acolorbright
- Created: 2016-10-18T13:11:59.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T11:42:33.000Z (about 1 year ago)
- Last Synced: 2024-03-21T03:20:35.913Z (10 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# restart-latest-codeship-build
We built this little service because we wanted to set up a Webhook on [Contentful] that triggers a restart of the latest build of a project on [Codeship] whenever new content is published. Unfortunately Codeship only provides an API to trigger a specific build for which you must know the *build_id* upfront. In order to get the ID of the latest build, one must first request the [details of the project], find the ID of the latest build on the master branch, and then [restart the build] using that ID. But that requires two requests and a bit of code. So you could not have a single URL that you would use for a Webhook. Well, now you can.
## Usage
Send a POST request to
```
https://restart-latest-codeship-build.automat.io/:codeship_api_key/:codeship_project_id
```Get the value for `:codeship_api_key` from your [account settings page] and the `:codeshop_project_id` from the URL of the projects page (e.g. https://app.codeship.com/projects/:codeship_project_id)
## Feedback? Questions?
Please use [GitHub issues].
[Contentful]: https://www.contentful.com/
[Codeship]: https://www.codeship.com/
[details of the project]: https://documentation.codeship.com/integrations/api/#get-a-single-project
[restart the build]: https://documentation.codeship.com/integrations/api/#restart-a-single-build
[account settings page]: https://app.codeship.com/user/edit
[GitHub issues]: https://github.com/acolorbright/restart-latest-codeship-build/issues