3 Risposte
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
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.
con risposta 5 anni fa
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
con risposta 5 anni fa
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
con risposta 5 anni fa
Contenuto pertinente
- AWS UFFICIALEAggiornata un anno fa
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata un anno fa