How to use the @aws-cdk/aws-stepfunctions.Condition.stringEquals function in @aws-cdk/aws-stepfunctions

To help you get started, we’ve selected a few @aws-cdk/aws-stepfunctions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fourTheorem / slic-starter / cicd / lib / stages / build-job.ts View on Github external
},
      inputPath: `$`,
      resultPath: `$.buildStatus.${id}`,
      outputPath: '$'
    })

    const waitForBuild = new Wait(this, `Wait for ${id}`, {
      duration: WaitDuration.seconds(10)
    })

    this.task.next(waitForBuild)
    waitForBuild.next(checkBuildTask)
    checkBuildTask.next(
      new Choice(this, `${id} done?`)
        .when(
          Condition.stringEquals(
            `$.buildStatus.${id}.buildStatus`,
            'SUCCEEDED'
          ),
          new Succeed(this, `Success ${id}`)
        )
        .when(
          Condition.stringEquals(
            `$.buildStatus.${id}.buildStatus`,
            'IN_PROGRESS'
          ),
          waitForBuild
        )
        .otherwise(new Fail(this, `Failure ${id}`))
    )
  }
}
github fourTheorem / slic-starter / cicd / lib / stages / build-job.ts View on Github external
duration: WaitDuration.seconds(10)
    })

    this.task.next(waitForBuild)
    waitForBuild.next(checkBuildTask)
    checkBuildTask.next(
      new Choice(this, `${id} done?`)
        .when(
          Condition.stringEquals(
            `$.buildStatus.${id}.buildStatus`,
            'SUCCEEDED'
          ),
          new Succeed(this, `Success ${id}`)
        )
        .when(
          Condition.stringEquals(
            `$.buildStatus.${id}.buildStatus`,
            'IN_PROGRESS'
          ),
          waitForBuild
        )
        .otherwise(new Fail(this, `Failure ${id}`))
    )
  }
}