Unity fails to build with Jenkins

Setup

  • Unity 2019.3.0b10 (Pro License)
  • Ubuntu 18.04
  • Jenkins 2.190.2

Hi,

we are having trouble getting automated Unity builds running using Jenkins, see the log below.
I can only presume that the builds fail due to the line [LicensingClient] ERROR Failed to connect to local IPC.
The builds only fail in headless mode through the command line, building through the editor works fine on the same machine with the same projects and settings.

Any help is greatly appreciated.
Alexander

The log error is misleading, in that we are simply testing for the prior presence of the pipe, and is not a fatal error.
If the communication channel is not already present, we launch the licensing client (whose role is to mediate license requests). if was already there, we simply connect to it.

Also, please check command-line usage here.
I think that you might just need to issue your command in two steps:

  • manually activate your license (-manualLicenseFile flag):
    this will copy the license into a known location (ie. ~/.local/share/unity3d/Unity/Unity_lic.ulf),
    you may get an exit code of 1 (I know this is unconventional),
    you may not need the -username and -password flags,
  • load the project and execute your custom method (ie. -buildTarget, -projectPath and -executeMethod flags)

@danielo_unity Thanks for the tip; I must say that this is a very strange command line usage and not documented anywhere from what I can tell.

Following your advise we have managed to move along but are now stuck at this.

As it turned out the issue was due to corrupt JDK, SDK or NDK version / pathing issue.
Unity 2019.3.0b11, at least on Linux, does not properly install all of its Android requirements.
After a clean installation with all paths being set to default (Unity Recommended), the android build simply fails due to the SDK, JDK not being found.

A manual installation of those tools have fixed the issue.

We have an issue logged for this and are investigating: https://issuetracker.unity3d.com/product/unity/issues/guid/1177631/

Wow this fixed my issue as well