Jenkins Slack App Usage Guide
Last updated
Last updated
To trigger Unity builds from Slack, the Jenkins Build-A-Bot
SlackApp must first be integrated into the specific Slack channel.
To integrate the Slack app into a specific channel, click the dropdown arrow
next to the Channel name to open the Channel Settings window.
In the Channel Settings, open the Integrations
tab and click the Add an App
button.
In the search bar, search for Jenkins
, then click the Add
button next to the Jenkins Build-A-Bot
app.
There are two alternative ways to trigger Jenkins Builds - see below for each:
Slack Shortcut
Slash Command
Slack users need to be given permission to build jobs. This prevents unauthorized access and builds. Please let the Lion Studios Solutions Team know which users should have access to which build jobs, and we will set them up and notify you when they’re ready.
You can now trigger Jenkins builds from Slack.
At the bottom of any chat box in Slack, click on the Run Shortcut
button.
Then, choosePopup Form
from the list of shortcuts.
You should then see a form appear. Fill out the form with the values for your build.
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
Then click Request Build
. Your game Slack Channel should now receive notifications about build starts, completions, and errors.
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):
If your slash command succeeds, you will see a success message appear in your chat:
If the command fails with a non-descriptive error like dispatch_failed
, please contact Support, so we can investigate.