triggerWorkflowOnComplete param for cloud runner

This commit is contained in:
Frostebite
2023-02-05 00:16:42 +00:00
parent e334dc785a
commit 00c5685d03
21 changed files with 241 additions and 86 deletions

View File

@@ -11,6 +11,9 @@ export class AsyncWorkflow {
): Promise<string> {
try {
CloudRunnerLogger.log(`Cloud Runner is running async mode`);
const asyncEnvironmentVariable = new CloudRunnerEnvironmentVariable();
asyncEnvironmentVariable.name = `GAMECI_ASYNC_WORKFLOW`;
asyncEnvironmentVariable.value = `true`;
let output = '';
@@ -34,7 +37,7 @@ aws --version
node /builder/dist/index.js -m async-workflow`,
`/${CloudRunnerFolders.buildVolumeFolder}`,
`/${CloudRunnerFolders.buildVolumeFolder}/`,
environmentVariables,
[...environmentVariables, asyncEnvironmentVariable],
[
...secrets,
...[

View File

@@ -9,7 +9,11 @@ import { AsyncWorkflow } from './async-workflow';
export class WorkflowCompositionRoot implements WorkflowInterface {
async run(cloudRunnerStepState: CloudRunnerStepState) {
try {
if (CloudRunnerOptions.asyncCloudRunner) {
if (
CloudRunnerOptions.asyncCloudRunner &&
!CloudRunner.isCloudRunnerAsyncEnvironment &&
!CloudRunner.isCloudRunnerEnvironment
) {
return await AsyncWorkflow.runAsyncWorkflow(cloudRunnerStepState.environment, cloudRunnerStepState.secrets);
}