Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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}`))
)
}
}