SlackApp: Jenkins Build
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.
-
To integrate the Slack app into a specific channel, click the
dropdown arrownext to the Channel name to open the Channel Settings window.
-
In the Channel Settings, open the
Integrationstab and click theAdd an Appbutton.
-
In the search bar, search for
Jenkins, then click theAddbutton next to theJenkins Build-A-Botapp.
Trigger Builds from Slack
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. |
Use a Slack Shortcut
You can now trigger Jenkins builds from Slack.
- At the bottom of any chat box in Slack, click on the
Run Shortcutbutton.
- Then, choose
Jenkins buildfrom the list of shortcuts.
-
You should then see a Popup form appear. Fill out the form with the values for your build.
Available options:
Project[REQUIRED]- The
projectparameter 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
- The
Platform[REQUIRED]- Example:
iosorandroid
- Example:
Build Type[REQUIRED]- Example:
debugorrelease
- Example:
Build Number[optional]- Example:
38
- Example:
Version Number[optional]- Example:
2.12.2
- Example:
Branch Name or Commit Hash[optional]- You can specify a
branch nameor acommit hash. If you omit this parameter, the job is built using thedefault branchspecified in the configuration. - Example:
origin/feature/jenkins-build
- You can specify a
-
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
jobparameter 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
- The
platform[REQUIRED]- Example:
iosorandroid
- Example:
buildType[REQUIRED]- Example:
debugorrelease
- Example:
buildNum[optional]- Example:
38
- Example:
versionNum[optional]- Example:
2.12.2
- Example:
branch[optional]- For the
branchparameter, you can specify either abranch nameor afull commit hash. If you omit thebranchparameter, the job is built using thedefault branchspecified in the configuration. - Example:
origin/feature/jenkins-build
- For the
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:
If the command fails with a non-descriptive error like dispatch_failed, please contact Support, so we can investigate.