pull/310/head
Frostebite 2021-12-31 15:01:04 +00:00
parent 6b680913ef
commit 775d61092e
6 changed files with 13 additions and 7 deletions

10
dist/index.js vendored
View File

@ -267,7 +267,7 @@ class BuildParameters {
customJob: input_1.default.customJob,
runNumber: input_1.default.runNumber,
branch: yield input_1.default.branch(),
githubRepo: input_1.default.githubRepo,
githubRepo: yield input_1.default.githubRepo(),
remoteBuildCluster: input_1.default.cloudRunnerCluster,
awsStackName: input_1.default.awsBaseStackName,
gitSha: input_1.default.gitSha,
@ -2737,6 +2737,7 @@ class BuildStep {
}
static BuildStep(image, environmentVariables, secrets) {
return __awaiter(this, void 0, void 0, function* () {
cloud_runner_logger_1.default.logLine(` `);
cloud_runner_logger_1.default.logLine('Starting part 2/2 (build unity project)');
return yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.runTask(cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid, image, `
export GITHUB_WORKSPACE="${cloud_runner_state_1.CloudRunnerState.repoPathFull}"
@ -2803,6 +2804,7 @@ class SetupStep {
static downloadRepository(image, environmentVariables, secrets) {
return __awaiter(this, void 0, void 0, function* () {
try {
cloud_runner_logger_1.default.logLine(` `);
cloud_runner_logger_1.default.logLine('Starting step 1/2 (setup game files from repository)');
return yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.runTask(cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid, image, `
apk update -q
@ -3486,8 +3488,10 @@ class Input {
static get region() {
return Input.getInput('region') || 'eu-west-2';
}
static get githubRepo() {
return Input.getInput('GITHUB_REPOSITORY') || git_repo_1.GitRepoReader.GetRemote() || 'game-ci/unity-builder';
static githubRepo() {
return __awaiter(this, void 0, void 0, function* () {
return Input.getInput('GITHUB_REPOSITORY') || (yield git_repo_1.GitRepoReader.GetRemote()) || 'game-ci/unity-builder';
});
}
static branch() {
return __awaiter(this, void 0, void 0, function* () {

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -98,7 +98,7 @@ class BuildParameters {
customJob: Input.customJob,
runNumber: Input.runNumber,
branch: await Input.branch(),
githubRepo: Input.githubRepo,
githubRepo: await Input.githubRepo(),
remoteBuildCluster: Input.cloudRunnerCluster,
awsStackName: Input.awsBaseStackName,
gitSha: Input.gitSha,

View File

@ -19,6 +19,7 @@ export class BuildStep implements StepInterface {
environmentVariables: CloudRunnerEnvironmentVariable[],
secrets: CloudRunnerSecret[],
) {
CloudRunnerLogger.logLine(` `);
CloudRunnerLogger.logLine('Starting part 2/2 (build unity project)');
return await CloudRunnerState.CloudRunnerProviderPlatform.runTask(
CloudRunnerState.buildParams.buildGuid,

View File

@ -24,6 +24,7 @@ export class SetupStep implements StepInterface {
secrets: CloudRunnerSecret[],
) {
try {
CloudRunnerLogger.logLine(` `);
CloudRunnerLogger.logLine('Starting step 1/2 (setup game files from repository)');
return await CloudRunnerState.CloudRunnerProviderPlatform.runTask(
CloudRunnerState.buildParams.buildGuid,

View File

@ -31,8 +31,8 @@ class Input {
static get region(): string {
return Input.getInput('region') || 'eu-west-2';
}
static get githubRepo(): string {
return Input.getInput('GITHUB_REPOSITORY') || GitRepoReader.GetRemote() || 'game-ci/unity-builder';
static async githubRepo() {
return Input.getInput('GITHUB_REPOSITORY') || (await GitRepoReader.GetRemote()) || 'game-ci/unity-builder';
}
static async branch() {
if (await GitRepoReader.GetBranch()) {