Serialize gitSha
parent
330b24bf21
commit
92e4c11048
|
|
@ -304,6 +304,7 @@ class BuildParameters {
|
||||||
logToFile: false,
|
logToFile: false,
|
||||||
remoteBuildCluster: input_1.default.cloudRunnerCluster,
|
remoteBuildCluster: input_1.default.cloudRunnerCluster,
|
||||||
awsStackName: input_1.default.awsBaseStackName,
|
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}
|
git clone --progress --verbose ${cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl} ${cloud_runner_state_1.CloudRunnerState.repoPathFull}
|
||||||
`);
|
`);
|
||||||
yield run_cli_1.RunCli.RunCli(`
|
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}`);
|
cloud_runner_logger_1.default.logRemoteCli(`Checked out ${process.env.GITHUB_SHA}`);
|
||||||
yield run_cli_1.RunCli.RunCli(`
|
yield run_cli_1.RunCli.RunCli(`
|
||||||
|
|
@ -3281,6 +3282,14 @@ class Input {
|
||||||
return 'remote-builder/unified-providers';
|
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() {
|
static get runNumber() {
|
||||||
return Input.getInput('GITHUB_RUN_NUMBER') || '0';
|
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 branch;
|
||||||
public githubRepo;
|
public githubRepo;
|
||||||
public logToFile;
|
public logToFile;
|
||||||
|
public gitSha;
|
||||||
|
|
||||||
static async create(): Promise<BuildParameters> {
|
static async create(): Promise<BuildParameters> {
|
||||||
const buildFile = this.parseBuildFile(Input.buildName, Input.targetPlatform, Input.androidAppBundle);
|
const buildFile = this.parseBuildFile(Input.buildName, Input.targetPlatform, Input.androidAppBundle);
|
||||||
|
|
@ -97,6 +98,7 @@ class BuildParameters {
|
||||||
logToFile: false,
|
logToFile: false,
|
||||||
remoteBuildCluster: Input.cloudRunnerCluster,
|
remoteBuildCluster: Input.cloudRunnerCluster,
|
||||||
awsStackName: Input.awsBaseStackName,
|
awsStackName: Input.awsBaseStackName,
|
||||||
|
gitSha: Input.gitSha,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export class DownloadRepository {
|
||||||
git clone --progress --verbose ${CloudRunnerState.targetBuildRepoUrl} ${CloudRunnerState.repoPathFull}
|
git clone --progress --verbose ${CloudRunnerState.targetBuildRepoUrl} ${CloudRunnerState.repoPathFull}
|
||||||
`);
|
`);
|
||||||
await RunCli.RunCli(`
|
await RunCli.RunCli(`
|
||||||
git checkout ${process.env.GITHUB_SHA}
|
git checkout ${CloudRunnerState.buildParams.gitSha}
|
||||||
`);
|
`);
|
||||||
CloudRunnerLogger.logRemoteCli(`Checked out ${process.env.GITHUB_SHA}`);
|
CloudRunnerLogger.logRemoteCli(`Checked out ${process.env.GITHUB_SHA}`);
|
||||||
await RunCli.RunCli(`
|
await RunCli.RunCli(`
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,15 @@ class Input {
|
||||||
return 'remote-builder/unified-providers';
|
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() {
|
static get runNumber() {
|
||||||
return Input.getInput('GITHUB_RUN_NUMBER') || '0';
|
return Input.getInput('GITHUB_RUN_NUMBER') || '0';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue