I am trying to trigger the code pipeline from Amazon EventBridge when a tag push is made into codecommit.
what I am trying to achieve is
git tag v0.0.0-dev >> triggering development event rule and running development pipeline
git tag v0.0.0-stage >> triggering staging event rule and running staging pipeline
git tag v0.0.0-prod >> triggering production event rule and running production pipeline
with the following rule I was able to trigger the individual pipeline with matching string at prefix
{
"source": [
"aws.codecommit"
],
"detail-type": [
"CodeCommit Repository State Change"
],
"resources": [
"arn:aws:codecommit:ap-southeast-2:12345678910:reponame"
],
"detail": {
"event": [
"referenceCreated",
"referenceUpdated"
],
"referenceType": [
"tag"
],
"referenceName": [
{
"prefix": "stage"
}
]
}
}
ie instead of v0.0.0-stage I need to use stage-v0.0.0
Is there any event pattern we can use such that the required triggering string comes anywhere in the tag or at least at the end.