Serialize gitSha
parent
330b24bf21
commit
92e4c11048
|
|
@ -304,6 +304,7 @@ class BuildParameters {
|
|||
logToFile: false,
|
||||
remoteBuildCluster: input_1.default.cloudRunnerCluster,
|
||||
awsStackName: input_1.default.awsBaseStackName,
|
||||
gitSha: input_1.default.gitSha,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
@ -2061,7 +2062,7 @@ class DownloadRepository {
|
|||
git clone --progress --verbose ${cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl} ${cloud_runner_state_1.CloudRunnerState.repoPathFull}
|
||||
`);
|
||||
yield run_cli_1.RunCli.RunCli(`
|
||||
git checkout ${process.env.GITHUB_SHA}
|
||||
git checkout ${cloud_runner_state_1.CloudRunnerState.buildParams.gitSha}
|
||||
`);
|
||||
cloud_runner_logger_1.default.logRemoteCli(`Checked out ${process.env.GITHUB_SHA}`);
|
||||
yield run_cli_1.RunCli.RunCli(`
|
||||
|
|
@ -3019,7 +3020,7 @@ class ImageEnvironmentFactory {
|
|||
const environmentVariables = ImageEnvironmentFactory.getEnvironmentVariables(parameters);
|
||||
let string = '';
|
||||
for (const p of environmentVariables) {
|
||||
string += `--env ${p.name}="${p.value}" \
|
||||
string += `--env ${p.name}="${p.value}" \
|
||||
`;
|
||||
}
|
||||
return string;
|
||||
|
|
@ -3281,6 +3282,14 @@ class Input {
|
|||
return 'remote-builder/unified-providers';
|
||||
}
|
||||
}
|
||||
static get gitSha() {
|
||||
if (Input.getInput(`GITHUB_SHA`)) {
|
||||
return Input.getInput(`GITHUB_SHA`);
|
||||
}
|
||||
if (Input.getInput(`GitSHA`)) {
|
||||
return Input.getInput(`GitSHA`);
|
||||
}
|
||||
}
|
||||
static get runNumber() {
|
||||
return Input.getInput('GITHUB_RUN_NUMBER') || '0';
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -45,6 +45,7 @@ class BuildParameters {
|
|||
public branch;
|
||||
public githubRepo;
|
||||
public logToFile;
|
||||
public gitSha;
|
||||
|
||||
static async create(): Promise<BuildParameters> {
|
||||
const buildFile = this.parseBuildFile(Input.buildName, Input.targetPlatform, Input.androidAppBundle);
|
||||
|
|
@ -97,6 +98,7 @@ class BuildParameters {
|
|||
logToFile: false,
|
||||
remoteBuildCluster: Input.cloudRunnerCluster,
|
||||
awsStackName: Input.awsBaseStackName,
|
||||
gitSha: Input.gitSha,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export class DownloadRepository {
|
|||
git clone --progress --verbose ${CloudRunnerState.targetBuildRepoUrl} ${CloudRunnerState.repoPathFull}
|
||||
`);
|
||||
await RunCli.RunCli(`
|
||||
git checkout ${process.env.GITHUB_SHA}
|
||||
git checkout ${CloudRunnerState.buildParams.gitSha}
|
||||
`);
|
||||
CloudRunnerLogger.logRemoteCli(`Checked out ${process.env.GITHUB_SHA}`);
|
||||
await RunCli.RunCli(`
|
||||
|
|
|
|||
|
|
@ -45,6 +45,15 @@ class Input {
|
|||
return 'remote-builder/unified-providers';
|
||||
}
|
||||
}
|
||||
|
||||
static get gitSha() {
|
||||
if (Input.getInput(`GITHUB_SHA`)) {
|
||||
return Input.getInput(`GITHUB_SHA`);
|
||||
}
|
||||
if (Input.getInput(`GitSHA`)) {
|
||||
return Input.getInput(`GitSHA`);
|
||||
}
|
||||
}
|
||||
static get runNumber() {
|
||||
return Input.getInput('GITHUB_RUN_NUMBER') || '0';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue