3개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
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.
답변함 5년 전
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
답변함 5년 전
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
답변함 5년 전
관련 콘텐츠
- AWS 공식업데이트됨 2년 전