3 Respostas
- Mais recentes
- Mais votos
- Mais comentários
1
Hi mumbo,
Glad you could find a solution for your issue. Right now CodeCommit does not emit events for tag creation, so as you have already figured out, the right way to get what you want, given you know the tag name, is to just call CodeCommit to get the commit id using that tag reference.
respondido há 5 anos
0
I think I found a way to do it.
Instead of trying to get the correct id from the CloudWatch event, I've used boto3 codecommit client in my Lambda function.
botoCodeCommitClient = boto3.client('codecommit')
botoCodeCommitClient.get_commit(repositoryName=repository, commitId=tagCommitId)
The result contains the correct commit id.
"commit": {
"commitId": "6a2359d64291a6490412a46de8d6566602e8f736",
"treeId": "72e8659841587e1afa59a775bafe9d6a5c8a8f5d",
"parents": ["8ccc13c43416850ac16105e789fc8db5911db11e"],
"message": "xxx",
"author": {
"name": "xxx",
"email": "xxx,
"date": "1557711827 +0000"
}
Edited by: mumbo on May 14, 2019 1:10 AM
respondido há 5 anos
0
Hi robison,
I am planning to add the branch name to the artifact path on S3. Eg. /tags/<branchname>/<tagname>
Is there a way in boto3 to get the branch name of a given commit id?
Thanks
respondido há 5 anos
Conteúdo relevante
- AWS OFICIALAtualizada há 2 anos