Merge 2dda9721f7
into 9d6bdcbdc5
commit
b1032148d9
|
@ -255,6 +255,13 @@ inputs:
|
|||
default: ''
|
||||
required: false
|
||||
description: 'The Unity licensing server address to use for activating Unity.'
|
||||
unityLicensingProductIds:
|
||||
default: ''
|
||||
required: false
|
||||
description:
|
||||
'Comma separated list of license product identifiers to request licenses for from the license server. Not setting
|
||||
this will request the default license product configured on the licensing server. Only applicable if
|
||||
unityLicensingServer is set.'
|
||||
dockerWorkspacePath:
|
||||
default: '/github/workspace'
|
||||
required: false
|
||||
|
|
|
@ -293,6 +293,7 @@ class BuildParameters {
|
|||
customImage: input_1.default.customImage,
|
||||
unitySerial,
|
||||
unityLicensingServer: input_1.default.unityLicensingServer,
|
||||
unityLicensingProductIds: input_1.default.unityLicensingProductIds,
|
||||
skipActivation: input_1.default.skipActivation,
|
||||
runnerTempPath: input_1.default.runnerTempPath,
|
||||
targetPlatform: input_1.default.targetPlatform,
|
||||
|
@ -6420,6 +6421,10 @@ class ImageEnvironmentFactory {
|
|||
name: 'UNITY_LICENSING_SERVER',
|
||||
value: parameters.unityLicensingServer,
|
||||
},
|
||||
{
|
||||
name: 'UNITY_LICENSING_PRODUCT_IDS',
|
||||
value: parameters.unityLicensingProductIds,
|
||||
},
|
||||
{ name: 'SKIP_ACTIVATION', value: parameters.skipActivation },
|
||||
{ name: 'UNITY_VERSION', value: parameters.editorVersion },
|
||||
{
|
||||
|
@ -6985,6 +6990,9 @@ class Input {
|
|||
static get unityLicensingServer() {
|
||||
return Input.getInput('unityLicensingServer') ?? '';
|
||||
}
|
||||
static get unityLicensingProductIds() {
|
||||
return Input.getInput('unityLicensingProductIds') ?? '';
|
||||
}
|
||||
static get buildMethod() {
|
||||
return Input.getInput('buildMethod') ?? ''; // Processed in docker file
|
||||
}
|
||||
|
@ -7240,6 +7248,7 @@ class PlatformSetup {
|
|||
}
|
||||
let servicesConfig = node_fs_1.default.readFileSync(servicesConfigPathTemplate).toString();
|
||||
servicesConfig = servicesConfig.replace('%URL%', buildParameters.unityLicensingServer);
|
||||
servicesConfig = servicesConfig.replace('%LICENSE_PRODUCT_IDS%', buildParameters.unityLicensingProductIds);
|
||||
node_fs_1.default.writeFileSync(servicesConfigPath, servicesConfig);
|
||||
platform_setup_1.SetupAndroid.setup(buildParameters);
|
||||
}
|
||||
|
@ -7446,6 +7455,7 @@ class SetupMac {
|
|||
process.env.UNITY_VERSION = buildParameters.editorVersion;
|
||||
process.env.UNITY_SERIAL = buildParameters.unitySerial;
|
||||
process.env.UNITY_LICENSING_SERVER = buildParameters.unityLicensingServer;
|
||||
process.env.UNITY_LICENSING_PRODUCT_IDS = buildParameters.unityLicensingProductIds;
|
||||
process.env.SKIP_ACTIVATION = buildParameters.skipActivation;
|
||||
process.env.PROJECT_PATH = buildParameters.projectPath;
|
||||
process.env.BUILD_PROFILE = buildParameters.buildProfile;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,5 +3,6 @@
|
|||
"enableEntitlementLicensing": true,
|
||||
"enableFloatingApi": true,
|
||||
"clientConnectTimeoutSec": 5,
|
||||
"clientHandshakeTimeoutSec": 10
|
||||
"clientHandshakeTimeoutSec": 10,
|
||||
"toolset": "%LICENSE_PRODUCT_IDS%"
|
||||
}
|
||||
|
|
|
@ -206,6 +206,14 @@ describe('BuildParameters', () => {
|
|||
await expect(BuildParameters.create()).rejects.toThrowError();
|
||||
});
|
||||
|
||||
it('returns the unity licensing product ids', async () => {
|
||||
const mockValue = 'license_id_1';
|
||||
jest.spyOn(Input, 'unityLicensingProductIds', 'get').mockReturnValue(mockValue);
|
||||
await expect(BuildParameters.create()).resolves.toEqual(
|
||||
expect.objectContaining({ unityLicensingProductIds: mockValue }),
|
||||
);
|
||||
});
|
||||
|
||||
it('return serial when no license server is provided', async () => {
|
||||
const mockValue = '123';
|
||||
delete process.env.UNITY_LICENSE; // Need to delete this as it is set for every test currently
|
||||
|
|
|
@ -22,6 +22,7 @@ class BuildParameters {
|
|||
public customImage!: string;
|
||||
public unitySerial!: string;
|
||||
public unityLicensingServer!: string;
|
||||
public unityLicensingProductIds!: string;
|
||||
public skipActivation!: string;
|
||||
public runnerTempPath!: string;
|
||||
public targetPlatform!: string;
|
||||
|
@ -149,6 +150,7 @@ class BuildParameters {
|
|||
customImage: Input.customImage,
|
||||
unitySerial,
|
||||
unityLicensingServer: Input.unityLicensingServer,
|
||||
unityLicensingProductIds: Input.unityLicensingProductIds,
|
||||
skipActivation: Input.skipActivation,
|
||||
runnerTempPath: Input.runnerTempPath,
|
||||
targetPlatform: Input.targetPlatform,
|
||||
|
|
|
@ -29,6 +29,10 @@ class ImageEnvironmentFactory {
|
|||
name: 'UNITY_LICENSING_SERVER',
|
||||
value: parameters.unityLicensingServer,
|
||||
},
|
||||
{
|
||||
name: 'UNITY_LICENSING_PRODUCT_IDS',
|
||||
value: parameters.unityLicensingProductIds,
|
||||
},
|
||||
{ name: 'SKIP_ACTIVATION', value: parameters.skipActivation },
|
||||
{ name: 'UNITY_VERSION', value: parameters.editorVersion },
|
||||
{
|
||||
|
|
|
@ -127,6 +127,10 @@ class Input {
|
|||
return Input.getInput('unityLicensingServer') ?? '';
|
||||
}
|
||||
|
||||
static get unityLicensingProductIds(): string {
|
||||
return Input.getInput('unityLicensingProductIds') ?? '';
|
||||
}
|
||||
|
||||
static get buildMethod(): string {
|
||||
return Input.getInput('buildMethod') ?? ''; // Processed in docker file
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ class PlatformSetup {
|
|||
|
||||
let servicesConfig = fs.readFileSync(servicesConfigPathTemplate).toString();
|
||||
servicesConfig = servicesConfig.replace('%URL%', buildParameters.unityLicensingServer);
|
||||
servicesConfig = servicesConfig.replace('%LICENSE_PRODUCT_IDS%', buildParameters.unityLicensingProductIds);
|
||||
fs.writeFileSync(servicesConfigPath, servicesConfig);
|
||||
|
||||
SetupAndroid.setup(buildParameters);
|
||||
|
|
|
@ -168,6 +168,7 @@ class SetupMac {
|
|||
process.env.UNITY_VERSION = buildParameters.editorVersion;
|
||||
process.env.UNITY_SERIAL = buildParameters.unitySerial;
|
||||
process.env.UNITY_LICENSING_SERVER = buildParameters.unityLicensingServer;
|
||||
process.env.UNITY_LICENSING_PRODUCT_IDS = buildParameters.unityLicensingProductIds;
|
||||
process.env.SKIP_ACTIVATION = buildParameters.skipActivation;
|
||||
process.env.PROJECT_PATH = buildParameters.projectPath;
|
||||
process.env.BUILD_PROFILE = buildParameters.buildProfile;
|
||||
|
|
Loading…
Reference in New Issue