1. Home
  2. Kore.ai Conversational Platform
  3. Advanced Topics
  4. Bot Store
  5. Adding Bots
  6. Adding a Travis CI Bot

Adding a Travis CI Bot

Kore.ai provides integration for a built-in Travis CI Bot that you can use to display message notifications and execute tasks directly from your messaging channel such as Kore.ai Messenger. To use the Travis CI Bot, you just need to add the Bot to your messaging channel, and then configure the settings for the Bot, such as authentication to access Travis CI, and the notification messages that you want. For more information about other Kore.ai Bots, see Adding Bots.

About the Kore.ai Bot for Travis CI

DIYTravisCILogo Travis CI is an open-source hosted, distributed continuous integration service used to build and test projects hosted at GitHub. This Bot alerts you about build updates such as when a commit is completed in the repository.

Integration Type Webhook – Connect to this Bot using a webhook integration where the web application pushes message notifications in near real time.
Category Developer Tools – This Bot is available in the Bot Store in the Developer Tools category.
Channels Kore.ai – This Bot is available in the Kore.ai Messenger application.
Spark – This Bot is available in the Cisco Spark messaging application.
Slack – This Bot is available in the Slack messaging application.
Skype – This Bot is available in the Skype messaging application.

Configuring Travis CI

To configure a Travis CI webhook for Kore.ai, you must have a Travis CI account with administrator access as well as API access to configure a webhook. If you don’t, you’ll need to contact the Travis CI system administrator for your company. For more information, see the Getting Started in the Travis CI documentation.

To get started configuring the webhook in Travis CI, you’ll need two things:

  1. The Kore.ai webhook URL provided when you set up an alert in your messaging channel for each alert that you want to enable in Travis CI.
  2. A valid Username and Password for an account with Travis CI API access.

The webhook URL is account-specific and cannot be transferred to any other account. This means that if you configure a Travis CI webhook using a test account, you will have to recreate the alert and get a new webhook URL to configure in Travis CI. The following URL is an example webhook URL.

https://app.kore.com/hooks/c6089802f36250c179dcb1aa29afd24c

Configuring Webhook Tasks

This procedure describes the steps in Travis CI to configure a webhook using a Kore.ai webhook URL endpoint. In Travis CI, you must add your repository, and then add a file that contains the Kore.ai URL, called .travis.yml, to your repository.

  1. Log on to Travis CI, and then to add a repository, click the Plus icon to the right of My Repositories.
  2. On the Repository page, to add the repository, click the switch next to the repository that you want to add a webhook to.
  3. Open the repository in your source control application, and then create a new .travis.ymlfile in the root directory that contains the following code:
    notifications:
      webhooks:        https://YourCompany.kore.com/hooks/c6089802f36250c179dcb1aa29afd24c

    where the URL for the webhooks parameter is the Kore.ai webhook URL for the alert.

  4. Save the file in the root directory of your repository.

Configuring Webhook Notifications

The following code describes how to configure events in Travis CI in the .travis.yml file that can be used to initiate an alert message.

notifications:
  webhooks:
    urls:
      - http://hooks.mydomain.com/travisci
      - http://hooks.mydomain.com/events
    on_success: [always|never|change] # default: always
    on_failure: [always|never|change] # default: always
    on_start: [always|never|change] # default: always

For more information, see Webhook Notification in the Travis CI documentation.

To setup real-time notifications in your messaging channel using an Travis CI webhook, for example, in the Kore.ai Messenger channel, click , click Get notified when…, click Build Update, and then in the Setup Task dialog:

  • click the Activate button to generate a Webhook URL.
  • copy and save the URL, or click Email Instructions to send the URL to an email account. For more information, see Configuring Travis CI Webhooks.
  • optionally customize the Task Name 
  • optionally customize the Short Description
  • enable or disable Mute task notifications
  • and then click Finish.

Next Steps

After the webhook is configured, when any of the webhook events occur in Travis CI or the scheduled tasks run, a message is displayed in your preferred messaging channel.

Was this article helpful to you? Yes No