mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Added cloneDepth for CloudRunner options to specify depth of clone on the repo
This commit is contained in:
parent
4b9e1df58e
commit
05bb9931cc
@ -261,7 +261,10 @@ inputs:
|
||||
default: 'false'
|
||||
required: false
|
||||
description: 'Skip the activation/deactivation of Unity. This assumes Unity is already activated.'
|
||||
|
||||
cloneDepth:
|
||||
default: '50'
|
||||
required: false
|
||||
description: '[CloudRunner] Specifies the depth of the clone for the repository'
|
||||
outputs:
|
||||
volume:
|
||||
description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes'
|
||||
|
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
@ -67,6 +67,7 @@ class BuildParameters {
|
||||
public pullInputList!: string[];
|
||||
public inputPullCommand!: string;
|
||||
public cacheKey!: string;
|
||||
public cloneDepth!: number;
|
||||
|
||||
public postBuildContainerHooks!: string;
|
||||
public preBuildContainerHooks!: string;
|
||||
@ -205,6 +206,7 @@ class BuildParameters {
|
||||
pullInputList: CloudRunnerOptions.pullInputList,
|
||||
kubeStorageClass: CloudRunnerOptions.kubeStorageClass,
|
||||
cacheKey: CloudRunnerOptions.cacheKey,
|
||||
|
||||
maxRetainedWorkspaces: Number.parseInt(CloudRunnerOptions.maxRetainedWorkspaces),
|
||||
useLargePackages: CloudRunnerOptions.useLargePackages,
|
||||
useCompressionStrategy: CloudRunnerOptions.useCompressionStrategy,
|
||||
@ -218,6 +220,7 @@ class BuildParameters {
|
||||
cacheUnityInstallationOnMac: Input.cacheUnityInstallationOnMac,
|
||||
unityHubVersionOnMac: Input.unityHubVersionOnMac,
|
||||
dockerWorkspacePath: Input.dockerWorkspacePath,
|
||||
cloneDepth: Number.parseInt(CloudRunnerOptions.cloneDepth),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -139,6 +139,10 @@ class CloudRunnerOptions {
|
||||
return CloudRunnerOptions.getInput('customJob') || '';
|
||||
}
|
||||
|
||||
static get cloneDepth(): string {
|
||||
return CloudRunnerOptions.getInput('cloneDepth') || `50`;
|
||||
}
|
||||
|
||||
// ### ### ###
|
||||
// Custom commands from files parameters
|
||||
// ### ### ###
|
||||
|
@ -184,7 +184,9 @@ export class RemoteClient {
|
||||
await CloudRunnerSystem.Run(`git config --global filter.lfs.process "git-lfs filter-process --skip"`);
|
||||
try {
|
||||
await CloudRunnerSystem.Run(
|
||||
`git clone ${CloudRunnerFolders.targetBuildRepoUrl} ${path.basename(CloudRunnerFolders.repoPathAbsolute)}`,
|
||||
`git clone --depth ${CloudRunnerOptions.cloneDepth} ${CloudRunnerFolders.targetBuildRepoUrl} ${path.basename(
|
||||
CloudRunnerFolders.repoPathAbsolute,
|
||||
)}`,
|
||||
);
|
||||
} catch (error: any) {
|
||||
throw error;
|
||||
|
Loading…
Reference in New Issue
Block a user