Skip to content

jorgenpt/unreal-game-sync-badges-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unreal-game-sync-badges

Introduction

unreal-game-sync-badges integrates Jenkins with an Unreal Game Sync (UGS) metadata server, allowing you to publish badges associated with changelists.

Getting started

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.

Installation

First, install this plugin on your Jenkins server:

  1. Download the .hpi file from the latest release of this plugin
  2. On your Jenkins instance, go to Manage Jenkins
  3. Navigate to Manage Plugins
  4. Change the tab to Advanced
  5. Select Choose File and point it to the unreal-game-sync-badges.hpi you downloaded
  6. Click Deploy (if you're upgrading, you'll need to restart Jenkins after this step)

image

Configuration

It's recommended to configure a global API URL and (if you're using RUGS) credentials:

  1. On your Jenkins instance, go to Manage Jenkins
  2. Go to Configure System
  3. Scroll down to UGS Metadata Server
  4. Set API URL to the URL of your metadata server (without the /api suffix)
  5. (Optional, if you're using RUGS with authentication) Configure a credential
    1. Create a new credential with Kind "Secret Text"
    2. Set the text to "username:password" from the ci_auth value from your RUGS instance's config.json
    3. Give it a descriptive ID
    4. Configure that ID under API CI Credential

image

Using it

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')

Contributing

Refer to our contribution guidelines

LICENSE

Licensed under MIT, see LICENSE