SlackApp: Jenkins Build-A-Bot

Integrate Build-A-Bot App

To trigger Unity builds from Slack, the Jenkins Build-A-Bot SlackApp must first be integrated into the specific Slack channel.

  1. To integrate the Slack app into a specific channel, click the dropdown arrow next to the Channel name to open the Channel Settings window.

    Slack Channel Settings
    Slack Channel Settings

  2. In the Channel Settings, open the Integrations tab and click the Add an App button.

    Slack Add an App
    Slack Add an App

  3. In the search bar, search for Jenkins, then click the Add button next to the Jenkins Build-A-Bot app.

    Search Jenkins
    Search Jenkins

Trigger Builds from Slack

There are two alternative ways to trigger Jenkins Builds - see below for each:

  1. Slack Shortcut
  2. Slash Command

Use a Slack Shortcut

You can now trigger Jenkins builds from Slack.

  1. At the bottom of any chat box in Slack, click on the Run Shortcut button.

    Run Shortcut
    Run Shortcut

  2. Then, choose Jenkins build from the list of shortcuts.

    Jenkins Build
    Jenkins Build

  3. You should then see a Popup form appear. Fill out the form with the values for your build.

    SlackApp Popup
    SlackApp Popup

    Available options:

    • Project [REQUIRED]
      • The project parameter is a special identifier that needs to be set up by the Lion Studios Solutions Team. Please contact us if you do not see your project in the dropdown list.
      • Example: inkinc
    • Platform [REQUIRED]
      • Example: ios or android
    • Build Type [REQUIRED]
      • Example: debug or release
    • Build Number [optional]
      • Example: 38
    • Version Number [optional]
      • Example: 2.12.2
    • Branch Name or Commit Hash [optional]
      • You can specify a branch name or a commit hash. If you omit this parameter, the job is built using the default branch specified in the configuration.
      • Example: origin/feature/jenkins-build
  4. Then click Request Build. Your game Slack Channel should now receive notifications about build starts, completions, and errors.

Use a Slash Command

To use the slash command, type /jenkins-build, then add the following parameters separated by spaces.

  • job [REQUIRED]
    • The job parameter is a special identifier that needs to be set up by the Lion Studios Solutions Team. Please get in touch with us for support.
    • Example: inkinc
  • platform [REQUIRED]
    • Example: ios or android
  • buildType [REQUIRED]
    • Example: debug or release
  • buildNum [optional]
    • Example: 38
  • versionNum [optional]
    • Example: 2.12.2
  • branch [optional]
    • For the branch parameter, you can specify either a branch name or a full commit hash. If you omit the branch parameter, the job is built using the default branch specified in the configuration.
    • Example: origin/feature/jenkins-build

An example build command might look like this (replace our example values with your own):

/jenkins-build job:inkinc platform:ios buildType:release versionNum:2.12.2 buildNum:38 branch:origin/feature/jenkins-build**

If your slash command succeeds, you will see a success message appear in your chat:

SlackApp Build Success
SlackApp Build Success

If the command fails with a non-descriptive error like dispatch_failed, please contact Support, so we can investigate.