unreal-game-sync-badges integrates Jenkins with an Unreal Game Sync (UGS) metadata server, allowing you to publish badges associated with changelists.
unreal-game-sync-badges is tested with RUGS, but should work with the default UGS metadata server. You can find details on configuring UGS on the official Unreal Engine website.
First, install this plugin on your Jenkins server:
- Download the
.hpi
file from the latest release of this plugin - On your Jenkins instance, go to
Manage Jenkins
- Navigate to
Manage Plugins
- Change the tab to
Advanced
- Select
Choose File
and point it to theunreal-game-sync-badges.hpi
you downloaded - Click
Deploy
(if you're upgrading, you'll need to restart Jenkins after this step)
It's recommended to configure a global API URL and (if you're using RUGS) credentials:
- On your Jenkins instance, go to
Manage Jenkins
- Go to Configure System
- Scroll down to
UGS Metadata Server
- Set
API URL
to the URL of your metadata server (without the/api
suffix) - (Optional, if you're using RUGS with authentication) Configure a credential
- Create a new credential with Kind "Secret Text"
- Set the text to "username:password" from the
ci_auth
value from your RUGS instance'sconfig.json
- Give it a descriptive ID
- Configure that ID under
API CI Credential
At the top of your Pipeline groovy script, add the following import:
import io.jenkins.plugins.ugs.BadgeResult;
Then, whenever you want to post or update a badge in UGS, use this -- changing the project
value to be the Perforce path to the folder that contains your Project.uproject
and setting result
to the appropriate BadgeResult
value. You can choose between STARTING
, FAILURE
, WARNING
, SUCCESS
, and SKIPPED
. The name
is the arbitrary name of your badge.
postUGSBadge(project: "//depot/branch/Project", changelist: env.P4_CHANGELIST, result: BadgeResult.STARTING, url: env.BUILD_URL, name: 'Editor')
Refer to our contribution guidelines
Licensed under MIT, see LICENSE