better named tests and log local-docker params

pull/461/head
Frostebite 2022-09-21 16:11:46 +01:00
parent 2990920e2d
commit a7e59b33eb
3 changed files with 17 additions and 3 deletions

7
dist/index.js vendored
View File

@ -5266,7 +5266,7 @@ class ImageEnvironmentFactory {
return string; return string;
} }
static getEnvironmentVariables(parameters, additionalVariables = []) { static getEnvironmentVariables(parameters, additionalVariables = []) {
const environmentVariables = [ let environmentVariables = [
{ name: 'UNITY_LICENSE', value: process.env.UNITY_LICENSE || test_license_reader_1.ReadLicense() }, { name: 'UNITY_LICENSE', value: process.env.UNITY_LICENSE || test_license_reader_1.ReadLicense() },
{ name: 'UNITY_LICENSE_FILE', value: process.env.UNITY_LICENSE_FILE }, { name: 'UNITY_LICENSE_FILE', value: process.env.UNITY_LICENSE_FILE },
{ name: 'UNITY_EMAIL', value: process.env.UNITY_EMAIL }, { name: 'UNITY_EMAIL', value: process.env.UNITY_EMAIL },
@ -5313,6 +5313,11 @@ class ImageEnvironmentFactory {
environmentVariables.push(element); environmentVariables.push(element);
} }
} }
for (const variable of environmentVariables) {
if (environmentVariables.find((x) => variable !== undefined && variable.name !== undefined && x.name === variable.name) === undefined) {
environmentVariables = environmentVariables.filter((x) => x !== variable);
}
}
} }
if (parameters.sshAgent) if (parameters.sshAgent)
environmentVariables.push({ name: 'SSH_AUTH_SOCK', value: '/ssh-agent' }); environmentVariables.push({ name: 'SSH_AUTH_SOCK', value: '/ssh-agent' });

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -25,7 +25,7 @@ class ImageEnvironmentFactory {
return string; return string;
} }
public static getEnvironmentVariables(parameters: BuildParameters, additionalVariables: any[] = []) { public static getEnvironmentVariables(parameters: BuildParameters, additionalVariables: any[] = []) {
const environmentVariables: Parameter[] = [ let environmentVariables: Parameter[] = [
{ name: 'UNITY_LICENSE', value: process.env.UNITY_LICENSE || ReadLicense() }, { name: 'UNITY_LICENSE', value: process.env.UNITY_LICENSE || ReadLicense() },
{ name: 'UNITY_LICENSE_FILE', value: process.env.UNITY_LICENSE_FILE }, { name: 'UNITY_LICENSE_FILE', value: process.env.UNITY_LICENSE_FILE },
{ name: 'UNITY_EMAIL', value: process.env.UNITY_EMAIL }, { name: 'UNITY_EMAIL', value: process.env.UNITY_EMAIL },
@ -76,6 +76,15 @@ class ImageEnvironmentFactory {
environmentVariables.push(element); environmentVariables.push(element);
} }
} }
for (const variable of environmentVariables) {
if (
environmentVariables.find(
(x) => variable !== undefined && variable.name !== undefined && x.name === variable.name,
) === undefined
) {
environmentVariables = environmentVariables.filter((x) => x !== variable);
}
}
} }
if (parameters.sshAgent) environmentVariables.push({ name: 'SSH_AUTH_SOCK', value: '/ssh-agent' }); if (parameters.sshAgent) environmentVariables.push({ name: 'SSH_AUTH_SOCK', value: '/ssh-agent' });