cleanup
parent
441f37d174
commit
37bc098549
|
|
@ -3823,7 +3823,7 @@ tree -L 3 ${sharedFolder}
|
||||||
myOutput += `[LOCAL-DOCKER-ERROR]${data.toString()}`;
|
myOutput += `[LOCAL-DOCKER-ERROR]${data.toString()}`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
}, true);
|
||||||
return myOutput;
|
return myOutput;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -5683,12 +5683,12 @@ const image_environment_factory_1 = __importDefault(__nccwpck_require__(25145));
|
||||||
const fs_1 = __nccwpck_require__(57147);
|
const fs_1 = __nccwpck_require__(57147);
|
||||||
const path_1 = __importDefault(__nccwpck_require__(71017));
|
const path_1 = __importDefault(__nccwpck_require__(71017));
|
||||||
class Docker {
|
class Docker {
|
||||||
static run(image, parameters, silent = false, overrideCommands = '', additionalVariables = [], options = false) {
|
static run(image, parameters, silent = false, overrideCommands = '', additionalVariables = [], options = false, entrypointBash = false) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
let runCommand = '';
|
let runCommand = '';
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case 'linux':
|
case 'linux':
|
||||||
runCommand = this.getLinuxCommand(image, parameters, overrideCommands, additionalVariables);
|
runCommand = this.getLinuxCommand(image, parameters, overrideCommands, additionalVariables, entrypointBash);
|
||||||
break;
|
break;
|
||||||
case 'win32':
|
case 'win32':
|
||||||
runCommand = this.getWindowsCommand(image, parameters);
|
runCommand = this.getWindowsCommand(image, parameters);
|
||||||
|
|
@ -5702,7 +5702,7 @@ class Docker {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static getLinuxCommand(image, parameters, overrideCommands = '', additionalVariables = []) {
|
static getLinuxCommand(image, parameters, overrideCommands = '', additionalVariables = [], entrypointBash = false) {
|
||||||
const { workspace, actionFolder, runnerTempPath, sshAgent, gitPrivateToken } = parameters;
|
const { workspace, actionFolder, runnerTempPath, sshAgent, gitPrivateToken } = parameters;
|
||||||
const githubHome = path_1.default.join(runnerTempPath, '_github_home');
|
const githubHome = path_1.default.join(runnerTempPath, '_github_home');
|
||||||
if (!fs_1.existsSync(githubHome))
|
if (!fs_1.existsSync(githubHome))
|
||||||
|
|
@ -5713,6 +5713,7 @@ class Docker {
|
||||||
return `docker run \
|
return `docker run \
|
||||||
--workdir /github/workspace \
|
--workdir /github/workspace \
|
||||||
--rm \
|
--rm \
|
||||||
|
${entrypointBash ? `--entrypoint /bin/bash` : ``}
|
||||||
${image_environment_factory_1.default.getEnvVarString(parameters, additionalVariables)} \
|
${image_environment_factory_1.default.getEnvVarString(parameters, additionalVariables)} \
|
||||||
--env UNITY_SERIAL \
|
--env UNITY_SERIAL \
|
||||||
--env GITHUB_WORKSPACE=/github/workspace \
|
--env GITHUB_WORKSPACE=/github/workspace \
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -124,6 +124,7 @@ tree -L 3 ${sharedFolder}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
true,
|
||||||
);
|
);
|
||||||
|
|
||||||
return myOutput;
|
return myOutput;
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,12 @@ class Docker {
|
||||||
overrideCommands = '',
|
overrideCommands = '',
|
||||||
additionalVariables: any[] = [],
|
additionalVariables: any[] = [],
|
||||||
options: any = false,
|
options: any = false,
|
||||||
|
entrypointBash: boolean = false,
|
||||||
) {
|
) {
|
||||||
let runCommand = '';
|
let runCommand = '';
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case 'linux':
|
case 'linux':
|
||||||
runCommand = this.getLinuxCommand(image, parameters, overrideCommands, additionalVariables);
|
runCommand = this.getLinuxCommand(image, parameters, overrideCommands, additionalVariables, entrypointBash);
|
||||||
break;
|
break;
|
||||||
case 'win32':
|
case 'win32':
|
||||||
runCommand = this.getWindowsCommand(image, parameters);
|
runCommand = this.getWindowsCommand(image, parameters);
|
||||||
|
|
@ -28,7 +29,13 @@ class Docker {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static getLinuxCommand(image, parameters, overrideCommands = '', additionalVariables: any[] = []): string {
|
static getLinuxCommand(
|
||||||
|
image,
|
||||||
|
parameters,
|
||||||
|
overrideCommands = '',
|
||||||
|
additionalVariables: any[] = [],
|
||||||
|
entrypointBash: boolean = false,
|
||||||
|
): string {
|
||||||
const { workspace, actionFolder, runnerTempPath, sshAgent, gitPrivateToken } = parameters;
|
const { workspace, actionFolder, runnerTempPath, sshAgent, gitPrivateToken } = parameters;
|
||||||
|
|
||||||
const githubHome = path.join(runnerTempPath, '_github_home');
|
const githubHome = path.join(runnerTempPath, '_github_home');
|
||||||
|
|
@ -39,6 +46,7 @@ class Docker {
|
||||||
return `docker run \
|
return `docker run \
|
||||||
--workdir /github/workspace \
|
--workdir /github/workspace \
|
||||||
--rm \
|
--rm \
|
||||||
|
${entrypointBash ? `--entrypoint /bin/bash` : ``}
|
||||||
${ImageEnvironmentFactory.getEnvVarString(parameters, additionalVariables)} \
|
${ImageEnvironmentFactory.getEnvVarString(parameters, additionalVariables)} \
|
||||||
--env UNITY_SERIAL \
|
--env UNITY_SERIAL \
|
||||||
--env GITHUB_WORKSPACE=/github/workspace \
|
--env GITHUB_WORKSPACE=/github/workspace \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue