- Newest
- Most votes
- Most comments
If you are using CodeCommit as Repo you can use an EventBridge trigger to invoke your pipeline:
- Create Eventbridge rule - here is an example rule:
{
"source": ["aws.codecommit"],
"detail-type": ["CodeCommit Repository State Change"],
"resources": ["arn:aws:codecommit:{{region}}:{{account_id}}:Test-Repo"],
"detail": {
"event": ["referenceCreated", "referenceUpdated"],
"repositoryName": ["Test-Repo"],
"referenceType": ["tag"],
"referenceName": [{
"prefix": "dev"
}]
}
}
- Configuring the CodePipeline target by providing the ARN of the created pipeline.
Here are the docs for Eventbrdige: https://docs.aws.amazon.com/eventbridge/
If you are using GitHub you may use a github action for the specific tag and inside the action you can use the AWS CodePipeline Trigger
By doing so we can trigger the pipeline but what about the branch name it is asking at the beginning of the creation of the pipeline would not it pull changes from that branch?
You can just use any branch name and remove that afterwards eg.:
Find out the name of the webhook: aws codepipeline list-webhooks
De-register: aws codepipeline deregister-webhook-with-third-party --webhook-name <webhook-name>
Delete: aws codepipeline delete-webhook --name <webhook-name>
Relevant content
- Accepted Answerasked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
I am using GitHub