I want to tag a commit with dynamic tag, for example git tag deploy-$(date +"%Y-%m-%d_%H-%M-%S")
, and then trigger codepipeline from cloudwatch. The problem is if I use following cloudwatch event pattern:
{
"source": [
"aws.codecommit"
],
"detail-type": [
"CodeCommit Repository State Change"
],
"resources": [
"arn:aws:codecommit:region:XXX:someName"
],
"detail": {
"event": [
"referenceCreated",
"referenceUpdated"
],
"repositoryName": [
"someName"
],
"referenceType": [
"tag"
],
"referenceName": [
"deploy"
]
}
}
it will be triggered only on specific tag - "deploy". Is there a way to say any tag that starts with(contains) deploy keyword?