Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

309
Vistas
AWS Cloudwatch trigger Codepipeline on dynamic tag

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?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

I was looking at the Content-based Filtering with Event Patterns docs and its Prefix Matching. The example given in the docs is:

{
  "time": [ { "prefix": "2017-10-02" } ],
}

Based on the example, the following seems as it could work in your case:

{
  "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": [
       { "prefix": "deploy" } ]
    ]
  }
}
over 4 years ago · Santiago Trujillo Denunciar

0

You can use a wildcard in the prefix:

{
  "source": [
    "aws.codecommit"
  ],
  "detail-type": [
    "CodeCommit Repository State Change"
  ],
  "detail": {
    "referenceType": [
      "tag"
    ],
    "referenceName": [
      {
        "prefix": "deploy-*"
      }
    ]
  }
}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda