cli default parameter
parent
9536ea889a
commit
89a6004493
|
|
@ -3150,9 +3150,9 @@ class Docker {
|
||||||
const { path, dockerfile, baseImage } = buildParameters;
|
const { path, dockerfile, baseImage } = buildParameters;
|
||||||
const { version, platform } = baseImage;
|
const { version, platform } = baseImage;
|
||||||
const tag = new image_tag_1.default({ repository: '', name: 'unity-builder', version, platform });
|
const tag = new image_tag_1.default({ repository: '', name: 'unity-builder', version, platform });
|
||||||
const command = `docker build ${path} \
|
const command = `docker build ${path} \
|
||||||
--file ${dockerfile} \
|
--file ${dockerfile} \
|
||||||
--build-arg IMAGE=${baseImage} \
|
--build-arg IMAGE=${baseImage} \
|
||||||
--tag ${tag}`;
|
--tag ${tag}`;
|
||||||
yield exec_1.exec(command, undefined, { silent });
|
yield exec_1.exec(command, undefined, { silent });
|
||||||
return tag;
|
return tag;
|
||||||
|
|
@ -3161,16 +3161,16 @@ class Docker {
|
||||||
static run(image, parameters, silent = false) {
|
static run(image, parameters, silent = false) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const { workspace, runnerTempPath, sshAgent } = parameters;
|
const { workspace, runnerTempPath, sshAgent } = parameters;
|
||||||
const command = `docker run \
|
const command = `docker run \
|
||||||
--workdir /github/workspace \
|
--workdir /github/workspace \
|
||||||
--rm \
|
--rm \
|
||||||
${image_environment_factory_1.default.getEnvVarString(parameters)}
|
${image_environment_factory_1.default.getEnvVarString(parameters)} \
|
||||||
--volume "/var/run/docker.sock":"/var/run/docker.sock" \
|
--volume "/var/run/docker.sock":"/var/run/docker.sock" \
|
||||||
--volume "${runnerTempPath}/_github_home":"/root" \
|
--volume "${runnerTempPath}/_github_home":"/root" \
|
||||||
--volume "${runnerTempPath}/_github_workflow":"/github/workflow" \
|
--volume "${runnerTempPath}/_github_workflow":"/github/workflow" \
|
||||||
--volume "${workspace}":"/github/workspace" \
|
--volume "${workspace}":"/github/workspace" \
|
||||||
${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \
|
${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \
|
||||||
${sshAgent ? '--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro' : ''} \
|
${sshAgent ? '--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro' : ''} \
|
||||||
${image}`;
|
${image}`;
|
||||||
yield exec_1.exec(command, undefined, { silent });
|
yield exec_1.exec(command, undefined, { silent });
|
||||||
});
|
});
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -24,7 +24,7 @@ class Docker {
|
||||||
const command = `docker run \
|
const command = `docker run \
|
||||||
--workdir /github/workspace \
|
--workdir /github/workspace \
|
||||||
--rm \
|
--rm \
|
||||||
${ImageEnvironmentFactory.getEnvVarString(parameters)}
|
${ImageEnvironmentFactory.getEnvVarString(parameters)} \
|
||||||
--volume "/var/run/docker.sock":"/var/run/docker.sock" \
|
--volume "/var/run/docker.sock":"/var/run/docker.sock" \
|
||||||
--volume "${runnerTempPath}/_github_home":"/root" \
|
--volume "${runnerTempPath}/_github_home":"/root" \
|
||||||
--volume "${runnerTempPath}/_github_workflow":"/github/workflow" \
|
--volume "${runnerTempPath}/_github_workflow":"/github/workflow" \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue