Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
resultPath: `$.runBuildResult.${id}`,
outputPath: '$' // Pass all input to the output
})
const checkBuildTask = new Task(this, `Check ${id} status`, {
resource: props.checkCodeBuildFunction,
parameters: {
'build.$': `$.runBuildResult.${id}.build`
},
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`,