mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-02-03 23:49:08 +08:00
* custom steps may leave value undefined, will be pulled from env vars * custom steps may leave value undefined, will be pulled from env vars * custom steps may leave value undefined, will be pulled from env vars * add 3 new premade steps, steam-deploy-client, steam-deploy-project, aws-s3-pull-build * fix * fix * fix * continue building async-workflow support * test checks * test checks * test checks * move github checks within build workflow * async workflow test * async workflow test * async workflow test * async workflow test * async workflow test * async workflow test * async workflow test * async workflow test for aws only * async workflow test for aws only * async workflow test for aws only * async workflow test for aws only * cleanup logging * disable lz4 compression by default * disable lz4 compression by default * AWS BASE STACK for tests * AWS BASE STACK for tests * AWS BASE STACK for tests * AWS BASE STACK for tests * AWS BASE STACK for tests * AWS BASE STACK for tests * disable lz4 compression by default * disable lz4 compression by default * Update github check with aws log * Update github check with aws log * Update github check with aws log * Update github check with aws log * Update github check with aws log * Update github check with aws log * Update github check with aws log * Update github check with aws log * Update github check with aws log * Update github check with aws log * Update github check with aws log * Update github check with aws log * Update github check with aws log * Update github check with aws log * kinesis and subscription filter for logs creation skipped when watchToEnd false * kinesis and subscription filter for logs creation skipped when watchToEnd false * kinesis and subscription filter for logs creation skipped when watchToEnd false * kinesis and subscription filter for logs creation skipped when watchToEnd false * kinesis and subscription filter for logs creation skipped when watchToEnd false * kinesis and subscription filter for logs creation skipped when watchToEnd false * kinesis and subscription filter for logs creation skipped when watchToEnd false * kinesis and subscription filter for logs creation skipped when watchToEnd false * kinesis and subscription filter for logs creation skipped when watchToEnd false * kinesis and subscription filter for logs creation skipped when watchToEnd false * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * cleanup local pipeline, log aws formation * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * async pipeline * workflow * workflow * workflow * workflow * workflow * workflow * workflow * workflow * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3 * parameterize s3
52 lines
1.7 KiB
TypeScript
52 lines
1.7 KiB
TypeScript
import CloudRunnerLogger from '../services/cloud-runner-logger';
|
|
import CloudRunnerSecret from '../services/cloud-runner-secret';
|
|
import { CloudRunnerFolders } from '../services/cloud-runner-folders';
|
|
import CloudRunnerEnvironmentVariable from '../services/cloud-runner-environment-variable';
|
|
import { CloudRunnerCustomSteps } from '../services/cloud-runner-custom-steps';
|
|
import { CustomStep } from '../services/custom-step';
|
|
import CloudRunner from '../cloud-runner';
|
|
|
|
export class CustomWorkflow {
|
|
public static async runCustomJobFromString(
|
|
buildSteps: string,
|
|
environmentVariables: CloudRunnerEnvironmentVariable[],
|
|
secrets: CloudRunnerSecret[],
|
|
): Promise<string> {
|
|
return await CustomWorkflow.runCustomJob(
|
|
CloudRunnerCustomSteps.ParseSteps(buildSteps),
|
|
environmentVariables,
|
|
secrets,
|
|
);
|
|
}
|
|
|
|
public static async runCustomJob(
|
|
buildSteps: CustomStep[],
|
|
environmentVariables: CloudRunnerEnvironmentVariable[],
|
|
secrets: CloudRunnerSecret[],
|
|
) {
|
|
try {
|
|
CloudRunnerLogger.log(`Cloud Runner is running in custom job mode`);
|
|
let output = '';
|
|
|
|
// if (CloudRunner.buildParameters?.cloudRunnerDebug) {
|
|
// CloudRunnerLogger.log(`Custom Job Description \n${JSON.stringify(buildSteps, undefined, 4)}`);
|
|
// }
|
|
for (const step of buildSteps) {
|
|
output += await CloudRunner.Provider.runTaskInWorkflow(
|
|
CloudRunner.buildParameters.buildGuid,
|
|
step.image,
|
|
step.commands,
|
|
`/${CloudRunnerFolders.buildVolumeFolder}`,
|
|
`/${CloudRunnerFolders.projectPathAbsolute}/`,
|
|
environmentVariables,
|
|
[...secrets, ...step.secrets],
|
|
);
|
|
}
|
|
|
|
return output;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
}
|