Added cloudRunnerRepoName to allow changing of CloudRunner launch unity builder repo
parent
05bb9931cc
commit
dc4de42931
|
@ -265,6 +265,10 @@ inputs:
|
||||||
default: '50'
|
default: '50'
|
||||||
required: false
|
required: false
|
||||||
description: '[CloudRunner] Specifies the depth of the clone for the repository'
|
description: '[CloudRunner] Specifies the depth of the clone for the repository'
|
||||||
|
cloudRunnerRepoName:
|
||||||
|
default: 'game-ci/unity-builder'
|
||||||
|
required: false
|
||||||
|
description: '[CloudRunner] Specifies the repo for the unity builder. Useful if you forked the repo for testing, features, or fixes.'
|
||||||
outputs:
|
outputs:
|
||||||
volume:
|
volume:
|
||||||
description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes'
|
description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes'
|
||||||
|
|
|
@ -339,7 +339,8 @@ class BuildParameters {
|
||||||
branch: input_1.default.branch.replace('/head', '') || (await git_repo_1.GitRepoReader.GetBranch()),
|
branch: input_1.default.branch.replace('/head', '') || (await git_repo_1.GitRepoReader.GetBranch()),
|
||||||
cloudRunnerBranch: cloud_runner_options_1.default.cloudRunnerBranch.split('/').reverse()[0],
|
cloudRunnerBranch: cloud_runner_options_1.default.cloudRunnerBranch.split('/').reverse()[0],
|
||||||
cloudRunnerDebug: cloud_runner_options_1.default.cloudRunnerDebug,
|
cloudRunnerDebug: cloud_runner_options_1.default.cloudRunnerDebug,
|
||||||
githubRepo: (input_1.default.githubRepo ?? (await git_repo_1.GitRepoReader.GetRemote())) || 'game-ci/unity-builder',
|
githubRepo: (input_1.default.githubRepo ?? (await git_repo_1.GitRepoReader.GetRemote())) || cloud_runner_options_1.default.cloudRunnerRepoName,
|
||||||
|
cloudRunnerRepoName: cloud_runner_options_1.default.cloudRunnerRepoName,
|
||||||
isCliMode: cli_1.Cli.isCliMode,
|
isCliMode: cli_1.Cli.isCliMode,
|
||||||
awsStackName: cloud_runner_options_1.default.awsStackName,
|
awsStackName: cloud_runner_options_1.default.awsStackName,
|
||||||
gitSha: input_1.default.gitSha,
|
gitSha: input_1.default.gitSha,
|
||||||
|
@ -1016,7 +1017,7 @@ class CloudRunnerFolders {
|
||||||
return node_path_1.default.join(CloudRunnerFolders.cacheFolderForCacheKeyFull, `Library`);
|
return node_path_1.default.join(CloudRunnerFolders.cacheFolderForCacheKeyFull, `Library`);
|
||||||
}
|
}
|
||||||
static get unityBuilderRepoUrl() {
|
static get unityBuilderRepoUrl() {
|
||||||
return `https://${cloud_runner_1.default.buildParameters.gitPrivateToken}@github.com/game-ci/unity-builder.git`;
|
return `https://${cloud_runner_1.default.buildParameters.gitPrivateToken}@github.com/${cloud_runner_1.default.buildParameters.unityBuilderRepo}.git`;
|
||||||
}
|
}
|
||||||
static get targetBuildRepoUrl() {
|
static get targetBuildRepoUrl() {
|
||||||
return `https://${cloud_runner_1.default.buildParameters.gitPrivateToken}@github.com/${cloud_runner_1.default.buildParameters.githubRepo}.git`;
|
return `https://${cloud_runner_1.default.buildParameters.gitPrivateToken}@github.com/${cloud_runner_1.default.buildParameters.githubRepo}.git`;
|
||||||
|
@ -1171,6 +1172,9 @@ class CloudRunnerOptions {
|
||||||
static get githubRepoName() {
|
static get githubRepoName() {
|
||||||
return CloudRunnerOptions.getInput('githubRepoName') || CloudRunnerOptions.githubRepo?.split(`/`)[1] || '';
|
return CloudRunnerOptions.getInput('githubRepoName') || CloudRunnerOptions.githubRepo?.split(`/`)[1] || '';
|
||||||
}
|
}
|
||||||
|
static get cloudRunnerRepoName() {
|
||||||
|
return CloudRunnerOptions.getInput('cloudRunnerRepoName') || `game-ci/unity-builder`;
|
||||||
|
}
|
||||||
static get finalHooks() {
|
static get finalHooks() {
|
||||||
return CloudRunnerOptions.getInput('finalHooks')?.split(',') || [];
|
return CloudRunnerOptions.getInput('finalHooks')?.split(',') || [];
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -75,6 +75,7 @@ class BuildParameters {
|
||||||
public runNumber!: string;
|
public runNumber!: string;
|
||||||
public branch!: string;
|
public branch!: string;
|
||||||
public githubRepo!: string;
|
public githubRepo!: string;
|
||||||
|
public cloudRunnerRepoName!: string;
|
||||||
public gitSha!: string;
|
public gitSha!: string;
|
||||||
public logId!: string;
|
public logId!: string;
|
||||||
public buildGuid!: string;
|
public buildGuid!: string;
|
||||||
|
@ -195,7 +196,8 @@ class BuildParameters {
|
||||||
branch: Input.branch.replace('/head', '') || (await GitRepoReader.GetBranch()),
|
branch: Input.branch.replace('/head', '') || (await GitRepoReader.GetBranch()),
|
||||||
cloudRunnerBranch: CloudRunnerOptions.cloudRunnerBranch.split('/').reverse()[0],
|
cloudRunnerBranch: CloudRunnerOptions.cloudRunnerBranch.split('/').reverse()[0],
|
||||||
cloudRunnerDebug: CloudRunnerOptions.cloudRunnerDebug,
|
cloudRunnerDebug: CloudRunnerOptions.cloudRunnerDebug,
|
||||||
githubRepo: (Input.githubRepo ?? (await GitRepoReader.GetRemote())) || 'game-ci/unity-builder',
|
githubRepo: (Input.githubRepo ?? (await GitRepoReader.GetRemote())) || CloudRunnerOptions.cloudRunnerRepoName,
|
||||||
|
cloudRunnerRepoName: CloudRunnerOptions.cloudRunnerRepoName,
|
||||||
isCliMode: Cli.isCliMode,
|
isCliMode: Cli.isCliMode,
|
||||||
awsStackName: CloudRunnerOptions.awsStackName,
|
awsStackName: CloudRunnerOptions.awsStackName,
|
||||||
gitSha: Input.gitSha,
|
gitSha: Input.gitSha,
|
||||||
|
|
|
@ -73,7 +73,7 @@ export class CloudRunnerFolders {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static get unityBuilderRepoUrl(): string {
|
public static get unityBuilderRepoUrl(): string {
|
||||||
return `https://${CloudRunner.buildParameters.gitPrivateToken}@github.com/game-ci/unity-builder.git`;
|
return `https://${CloudRunner.buildParameters.gitPrivateToken}@github.com/${CloudRunner.buildParameters.unityBuilderRepo}.git`;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static get targetBuildRepoUrl(): string {
|
public static get targetBuildRepoUrl(): string {
|
||||||
|
|
|
@ -74,6 +74,10 @@ class CloudRunnerOptions {
|
||||||
return CloudRunnerOptions.getInput('githubRepoName') || CloudRunnerOptions.githubRepo?.split(`/`)[1] || '';
|
return CloudRunnerOptions.getInput('githubRepoName') || CloudRunnerOptions.githubRepo?.split(`/`)[1] || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static get cloudRunnerRepoName(): string {
|
||||||
|
return CloudRunnerOptions.getInput('cloudRunnerRepoName') || `game-ci/unity-builder`;
|
||||||
|
}
|
||||||
|
|
||||||
static get finalHooks(): string[] {
|
static get finalHooks(): string[] {
|
||||||
return CloudRunnerOptions.getInput('finalHooks')?.split(',') || [];
|
return CloudRunnerOptions.getInput('finalHooks')?.split(',') || [];
|
||||||
}
|
}
|
||||||
|
@ -85,6 +89,7 @@ class CloudRunnerOptions {
|
||||||
static get githubRepo(): string | undefined {
|
static get githubRepo(): string | undefined {
|
||||||
return CloudRunnerOptions.getInput('GITHUB_REPOSITORY') || CloudRunnerOptions.getInput('GITHUB_REPO') || undefined;
|
return CloudRunnerOptions.getInput('GITHUB_REPOSITORY') || CloudRunnerOptions.getInput('GITHUB_REPO') || undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get branch(): string {
|
static get branch(): string {
|
||||||
if (CloudRunnerOptions.getInput(`GITHUB_REF`)) {
|
if (CloudRunnerOptions.getInput(`GITHUB_REF`)) {
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue