shorter names
parent
6909d78c11
commit
3215b2b8ac
|
@ -290,9 +290,9 @@ class BuildParameters {
|
|||
gitSha: input_1.default.gitSha,
|
||||
logId: nanoid_1.customAlphabet(cloud_runner_constants_1.default.alphabet, 9)(),
|
||||
buildGuid: cloud_runner_guid_1.default.generateGuid(input_1.default.runNumber, input_1.default.targetPlatform),
|
||||
commandHooks: cloud_runner_options_1.default.commandHooks(),
|
||||
inputPullCommand: cloud_runner_options_1.default.inputPullCommand(),
|
||||
pullInputList: cloud_runner_options_1.default.pullInputList(),
|
||||
commandHooks: cloud_runner_options_1.default.commandHooks,
|
||||
inputPullCommand: cloud_runner_options_1.default.inputPullCommand,
|
||||
pullInputList: cloud_runner_options_1.default.pullInputList,
|
||||
kubeStorageClass: cloud_runner_options_1.default.kubeStorageClass,
|
||||
cacheKey: cloud_runner_options_1.default.cacheKey,
|
||||
retainWorkspaces: cloud_runner_options_1.default.retainWorkspaces,
|
||||
|
@ -303,7 +303,7 @@ class BuildParameters {
|
|||
asyncWorkflow: cloud_runner_options_1.default.asyncCloudRunner,
|
||||
githubCheckId: cloud_runner_options_1.default.githubCheckId,
|
||||
finalHooks: cloud_runner_options_1.default.finalHooks,
|
||||
skipLFS: cloud_runner_options_1.default.skipLfs,
|
||||
skipLfs: cloud_runner_options_1.default.skipLfs,
|
||||
skipCache: cloud_runner_options_1.default.skipCache,
|
||||
cacheUnityInstallationOnMac: input_1.default.cacheUnityInstallationOnMac,
|
||||
unityHubVersionOnMac: input_1.default.unityHubVersionOnMac,
|
||||
|
@ -822,7 +822,7 @@ class CloudRunnerOptions {
|
|||
// ### ### ###
|
||||
// Custom commands from yaml parameters
|
||||
// ### ### ###
|
||||
static commandHooks() {
|
||||
static get commandHooks() {
|
||||
return CloudRunnerOptions.getInput('commandHooks') || '';
|
||||
}
|
||||
static get postBuildSteps() {
|
||||
|
@ -834,10 +834,10 @@ class CloudRunnerOptions {
|
|||
// ### ### ###
|
||||
// Input override handling
|
||||
// ### ### ###
|
||||
static pullInputList() {
|
||||
static get pullInputList() {
|
||||
return CloudRunnerOptions.getInput('pullInputList')?.split(`,`) || [];
|
||||
}
|
||||
static inputPullCommand() {
|
||||
static get inputPullCommand() {
|
||||
const value = CloudRunnerOptions.getInput('inputPullCommand');
|
||||
if (value === 'gcp-secret-manager') {
|
||||
return 'gcloud secrets versions access 1 --secret="{0}"';
|
||||
|
@ -4299,7 +4299,7 @@ class RemoteClient {
|
|||
process.chdir(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute);
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global filter.lfs.smudge "git-lfs smudge -- %f"`);
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global filter.lfs.process "git-lfs filter-process"`);
|
||||
if (!cloud_runner_1.default.buildParameters.skipLFS) {
|
||||
if (!cloud_runner_1.default.buildParameters.skipLfs) {
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git lfs pull`);
|
||||
remote_client_logger_1.RemoteClientLogger.log(`pulled latest LFS files`);
|
||||
node_console_1.assert(node_fs_1.default.existsSync(cloud_runner_folders_1.CloudRunnerFolders.lfsFolderAbsolute));
|
||||
|
@ -5013,10 +5013,10 @@ class CloudRunnerQueryOverride {
|
|||
return;
|
||||
}
|
||||
static shouldUseOverride(query) {
|
||||
if (cloud_runner_options_1.default.inputPullCommand() !== '') {
|
||||
if (cloud_runner_options_1.default.pullInputList().length > 0) {
|
||||
const doesInclude = cloud_runner_options_1.default.pullInputList().includes(query) ||
|
||||
cloud_runner_options_1.default.pullInputList().includes(input_1.default.ToEnvVarFormat(query));
|
||||
if (cloud_runner_options_1.default.inputPullCommand !== '') {
|
||||
if (cloud_runner_options_1.default.pullInputList.length > 0) {
|
||||
const doesInclude = cloud_runner_options_1.default.pullInputList.includes(query) ||
|
||||
cloud_runner_options_1.default.pullInputList.includes(input_1.default.ToEnvVarFormat(query));
|
||||
return doesInclude ? true : false;
|
||||
}
|
||||
else {
|
||||
|
@ -5028,10 +5028,10 @@ class CloudRunnerQueryOverride {
|
|||
if (!this.shouldUseOverride(query)) {
|
||||
throw new Error(`Should not be trying to run override query on ${query}`);
|
||||
}
|
||||
return await generic_input_reader_1.GenericInputReader.Run(formatFunction(cloud_runner_options_1.default.inputPullCommand(), [{ key: 0, value: query }]));
|
||||
return await generic_input_reader_1.GenericInputReader.Run(formatFunction(cloud_runner_options_1.default.inputPullCommand, [{ key: 0, value: query }]));
|
||||
}
|
||||
static async PopulateQueryOverrideInput() {
|
||||
const queries = cloud_runner_options_1.default.pullInputList();
|
||||
const queries = cloud_runner_options_1.default.pullInputList;
|
||||
CloudRunnerQueryOverride.queryOverrides = {};
|
||||
for (const element of queries) {
|
||||
if (CloudRunnerQueryOverride.shouldUseOverride(element)) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -77,7 +77,7 @@ class BuildParameters {
|
|||
public asyncWorkflow!: boolean;
|
||||
public githubCheckId!: string;
|
||||
public finalHooks!: string[];
|
||||
public skipLFS!: boolean;
|
||||
public skipLfs!: boolean;
|
||||
public skipCache!: boolean;
|
||||
public cacheUnityInstallationOnMac!: boolean;
|
||||
public unityHubVersionOnMac!: string;
|
||||
|
@ -169,9 +169,9 @@ class BuildParameters {
|
|||
gitSha: Input.gitSha,
|
||||
logId: customAlphabet(CloudRunnerConstants.alphabet, 9)(),
|
||||
buildGuid: CloudRunnerBuildGuid.generateGuid(Input.runNumber, Input.targetPlatform),
|
||||
commandHooks: CloudRunnerOptions.commandHooks(),
|
||||
inputPullCommand: CloudRunnerOptions.inputPullCommand(),
|
||||
pullInputList: CloudRunnerOptions.pullInputList(),
|
||||
commandHooks: CloudRunnerOptions.commandHooks,
|
||||
inputPullCommand: CloudRunnerOptions.inputPullCommand,
|
||||
pullInputList: CloudRunnerOptions.pullInputList,
|
||||
kubeStorageClass: CloudRunnerOptions.kubeStorageClass,
|
||||
cacheKey: CloudRunnerOptions.cacheKey,
|
||||
retainWorkspaces: CloudRunnerOptions.retainWorkspaces,
|
||||
|
@ -182,7 +182,7 @@ class BuildParameters {
|
|||
asyncWorkflow: CloudRunnerOptions.asyncCloudRunner,
|
||||
githubCheckId: CloudRunnerOptions.githubCheckId,
|
||||
finalHooks: CloudRunnerOptions.finalHooks,
|
||||
skipLFS: CloudRunnerOptions.skipLfs,
|
||||
skipLfs: CloudRunnerOptions.skipLfs,
|
||||
skipCache: CloudRunnerOptions.skipCache,
|
||||
cacheUnityInstallationOnMac: Input.cacheUnityInstallationOnMac,
|
||||
unityHubVersionOnMac: Input.unityHubVersionOnMac,
|
||||
|
|
|
@ -165,7 +165,7 @@ class CloudRunnerOptions {
|
|||
// Custom commands from yaml parameters
|
||||
// ### ### ###
|
||||
|
||||
static commandHooks() {
|
||||
static get commandHooks() {
|
||||
return CloudRunnerOptions.getInput('commandHooks') || '';
|
||||
}
|
||||
|
||||
|
@ -181,11 +181,11 @@ class CloudRunnerOptions {
|
|||
// Input override handling
|
||||
// ### ### ###
|
||||
|
||||
static pullInputList(): string[] {
|
||||
static get pullInputList(): string[] {
|
||||
return CloudRunnerOptions.getInput('pullInputList')?.split(`,`) || [];
|
||||
}
|
||||
|
||||
static inputPullCommand(): string {
|
||||
static get inputPullCommand(): string {
|
||||
const value = CloudRunnerOptions.getInput('inputPullCommand');
|
||||
|
||||
if (value === 'gcp-secret-manager') {
|
||||
|
|
|
@ -149,7 +149,7 @@ export class RemoteClient {
|
|||
process.chdir(CloudRunnerFolders.repoPathAbsolute);
|
||||
await CloudRunnerSystem.Run(`git config --global filter.lfs.smudge "git-lfs smudge -- %f"`);
|
||||
await CloudRunnerSystem.Run(`git config --global filter.lfs.process "git-lfs filter-process"`);
|
||||
if (!CloudRunner.buildParameters.skipLFS) {
|
||||
if (!CloudRunner.buildParameters.skipLfs) {
|
||||
await CloudRunnerSystem.Run(`git lfs pull`);
|
||||
RemoteClientLogger.log(`pulled latest LFS files`);
|
||||
assert(fs.existsSync(CloudRunnerFolders.lfsFolderAbsolute));
|
||||
|
|
|
@ -31,11 +31,11 @@ class CloudRunnerQueryOverride {
|
|||
}
|
||||
|
||||
private static shouldUseOverride(query: string) {
|
||||
if (CloudRunnerOptions.inputPullCommand() !== '') {
|
||||
if (CloudRunnerOptions.pullInputList().length > 0) {
|
||||
if (CloudRunnerOptions.inputPullCommand !== '') {
|
||||
if (CloudRunnerOptions.pullInputList.length > 0) {
|
||||
const doesInclude =
|
||||
CloudRunnerOptions.pullInputList().includes(query) ||
|
||||
CloudRunnerOptions.pullInputList().includes(Input.ToEnvVarFormat(query));
|
||||
CloudRunnerOptions.pullInputList.includes(query) ||
|
||||
CloudRunnerOptions.pullInputList.includes(Input.ToEnvVarFormat(query));
|
||||
|
||||
return doesInclude ? true : false;
|
||||
} else {
|
||||
|
@ -50,12 +50,12 @@ class CloudRunnerQueryOverride {
|
|||
}
|
||||
|
||||
return await GenericInputReader.Run(
|
||||
formatFunction(CloudRunnerOptions.inputPullCommand(), [{ key: 0, value: query }]),
|
||||
formatFunction(CloudRunnerOptions.inputPullCommand, [{ key: 0, value: query }]),
|
||||
);
|
||||
}
|
||||
|
||||
public static async PopulateQueryOverrideInput() {
|
||||
const queries = CloudRunnerOptions.pullInputList();
|
||||
const queries = CloudRunnerOptions.pullInputList;
|
||||
CloudRunnerQueryOverride.queryOverrides = {};
|
||||
for (const element of queries) {
|
||||
if (CloudRunnerQueryOverride.shouldUseOverride(element)) {
|
||||
|
|
Loading…
Reference in New Issue