在运行eb create或eb deploy EB之后,选择最新的git并进行部署之后,如何知道部署了哪个git (变更ID)?我希望有一种简单的方法来获得已部署的应用程序的changeId。
我们需要知道的一些可能的案例是
发布于 2017-10-18 23:31:16
接下来,您可以将您的EB部署与描述和版本标签的选择联系起来。
对于用例,可以指定git分支的HEAD作为版本标签:
>> eb deploy --message "New commit" --label `git rev-parse HEAD`成功完成部署后,您将能够看到与部署关联的版本标签带有git提交ID:
>> eb appversion
# Version Label Date Created Age Description
2 2c7f3bc984b3501091af4026a2de24d582a5f6e0 2017/10/18 23:19 5 mins New commit
1 app-171018_231247 2017/10/18 23:12 11 mins EB-CLI deploy发布于 2017-10-10 21:53:34
您可以始终根据最新部署版本的描述进行检查。此描述是git commit消息的第一行。但是,由于几乎80%的开发人员没有给出有意义的提交消息,因此这个值会很麻烦。接下来将检查已部署的版本状态。运行eb status将生成(用于我的应用程序)
Environment details for: APP-NAME
Application name: <name>
Region: ap-south-1
Deployed Version: app-6d83-171010_130148
Environment ID: e-hjab33mufj
Platform: arn:aws:elasticbeanstalk:ap-south-1::platform/Docker running on 64bit Amazon Linux/2.7.3
Tier: WebServer-Standard
CNAME: APP-NAME.ap-south-1.elasticbeanstalk.com
Updated: 2017-10-10 13:03:05.373000+00:00
Status: Ready
Health: Yellow
Running instances: 1请注意包含:app-6d83-171010_130148.的行在这里,6d83是最可识别的提交SHA值。所以,跑
git show 6d83会告诉你确切的承诺。
https://stackoverflow.com/questions/46676482
复制相似问题