Skip to content

Instantly share code, notes, and snippets.

@joonjoonjoon
Created May 9, 2025 16:11
Show Gist options
  • Save joonjoonjoon/f7a0ede9a16097e830e780fe1de77a06 to your computer and use it in GitHub Desktop.
Save joonjoonjoon/f7a0ede9a16097e830e780fe1de77a06 to your computer and use it in GitHub Desktop.
Docker and Jenkins activation woes (Unity Personal license)
withCredentials([
usernamePassword(credentialsId: 'unity_joon', usernameVariable: 'UNITY_CREDENTIALS_USR', passwordVariable: 'UNITY_CREDENTIALS_PSW'),
string(credentialsId: 'unity_serial', variable: 'UNITY_SERIAL')
]) {
unityImage.withRun("--privileged") { c ->
unityImage.inside("""
-v ${WORKSPACE}:/project
-v ${WORKSPACE}${OUTPUTPATH}:/build
-v /var/jenkins_home/.unity3d:/var/jenkins_home/.unity3d
-e UNITY_CONFIG_PATH=/project/.config/unity3d
-e UNITY_EMAIL=${UNITY_CREDENTIALS_USR} \
-e UNITY_USERNAME=${UNITY_CREDENTIALS_USR} \
-e UNITY_PASSWORD=${UNITY_CREDENTIALS_PSW} \
-e UNITY_SERIAL=${UNITY_SERIAL} \
-e UNITY_ENCODED_LICENSE_2022=${UNITY_SERIAL} \
-e UNITY_ENCODED_LICENSE_2021=${UNITY_SERIAL} \
-e UNITY_ENCODED_LICENSE_2020=${UNITY_SERIAL} \
-e HOME=/tmp
""") {
sh """
unity-editor \\
-batchmode \\
-nographics \\
-quit \\
-username ${UNITY_CREDENTIALS_USR} \\
-password ${UNITY_CREDENTIALS_PSW} \\
-serial ${UNITY_SERIAL}
"""
sh """
unity-editor \\
-quit \\
-nographics \\
-batchmode \\
-projectPath /project \\
-executeMethod ${UNITYFUNCTION} \\
-logfile - \\
-buildTarget ${UNITYPLATFORM} \\
-outputPath="/build/${OUTPUTFILENAME}" \\
-buildNumber="${BUILD_DISPLAY_NAME}"
"""
}
}
}
16:04:31 + unity-editor -batchmode -nographics -quit -username [email protected] -password **** -serial ****
16:04:31 _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
16:04:31 .3/staging
16:04:31 Build type: Release
16:04:31 Batch mode: YES
16:04:31 System name: Linux
16:04:31 Distro version: #1 SMP Tue Apr 15 16:00:54 UTC 2025
16:04:31 Kernel version: 6.10.14-linuxkit
16:04:31 Architecture: x86_64
16:04:31 Available memory: 7837 MB
16:04:32 User [email protected] logged in successfully
16:04:32 [UnityConnect::TryLogin] Request Succeeded.
16:04:32 [Licensing::Module] Trying to connect to existing licensing client channel...
16:04:32 [Licensing::IpcConnector] Channel LicenseClient- doesn't exist
16:04:32 [Licensing::Module] Successfully launched the LicensingClient (PId: 49)
16:04:33 [Licensing::IpcConnector] Successfully connected to: "LicenseClient-" at "2025-05-09T16:04:33.763121Z"
16:04:33 [Licensing::Module] LicensingClient has failed validation; ignoring
16:04:33 [Licensing::Client] Handshaking with LicensingClient:
16:04:33 Version: 1.16.1+e780b2e
16:04:33 Session Id: ec255a1c46b741cc944775f9f9a31cc6
16:04:33 Correlation Id: 170ee5f9136d9d4a2086307d2a5e8de9
16:04:33 External correlation Id: 5532891115006903639
16:04:33 Machine Id: D7nTUnjNAmtsUMcnoyrqkgIbYdM=
16:04:33 [Licensing::Module] Successfully connected to LicensingClient on channel: "LicenseClient-" (connect: 1.33s, validation: 0.11s, handshake: 0.00s)
16:04:33 [Licensing::IpcConnector] Successfully connected to: "LicenseClient--notifications" at "2025-05-09T16:04:33.882753Z"
16:04:33 [Licensing::Module] Connected to LicensingClient (PId: 49, launch time: 0.00, total connection time: 1.45s)
16:04:33 [Licensing::Client] Successfully updated the access token
16:04:33 [Licensing::Module] Successfully updated the access token mOLEYRDzVY...
16:04:34 [Licensing::Client] Successfully processed license management request
16:04:34 [Licensing::Module] Successfully activated the entitlement license
16:04:34 [Licensing::Client] Successfully queried for the EntitlementGroupsDetails
16:04:36 [Licensing::Client] Error: Code 500 while processing request (status: Request (PUT https://license.unity3d.com/api/transactions/74529dc13d2245ff85d224bc36463127) failed [500 Internal Server Error]: {
16:04:36 "message" : "Internal Server Error",
16:04:36 "code" : "120.999"
16:04:36 })
16:04:36 [Licensing::Module] License activation has failed. Aborting.`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment