Travis CI Free

Trigger a Travis CI build when new translations ready

Try Crowdin

Notify your Travis CI when there are new translations and that the build is required. This guide describes setting up a Crowdin webhook to invoke the build.

Travis CI' documentation says we should send the following request to trigger the build.

body='{
    "request": {
    "branch":"master"
    "sha":"bf944c952724dd2f00ff0c466a5e217d10f73bea"
}}'

curl -s -X POST \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Travis-API-Version: 3" \
    -H "Authorization: token xxxxxx" \
    -d "$body" \
    https://api.travis-ci.com/repo/travis-ci%2Ftravis-core/requests

We will configure Crowdin to send this request without any middleware, just by setting up the webhook on a needed event (e.g. File is 100% translated).

Depending on a Crowdin Edition you use, please check the documentation how to create a webhook in crowdin.com and Crowdin Enterprise.

Below is an example of a fully configured Crowdin webhook. Crowdin Travis CI Integration

You might have noticed that we have removed "sha" property from the body, this is because we request to build the latest commit from the "master" branch.

Use the following template to create a webhook URL: https://api.travis-ci.com/repo/<user-name>%2F<repo-name>/requests.

For more advanced setup please refer to the official documentation.

Crowdin is a platform that helps you manage and translate content into different languages. Integrate Crowdin with your repo, CMS, or other systems. Source content is always up to date for your translators, and translated content is returned automatically.

Learn More
Categories
Development
Works with
  • Crowdin Enterprise
  • crowdin.com
Details

Released on Aug 7, 2022

Updated on Aug 7, 2022

Published by Community

Identifier:travis-ci