简体   繁体   English

检测 CodeCommit 中的更改并在 EC2 实例中运行命令

[英]Detect change in CodeCommit and run command in EC2 instance

I want to detect changes in my amazon codecommit repo and run following commands:我想检测我的 amazon codecommit repo 中的更改并运行以下命令:

forever stopall
git clone // clone codecommit repo
forever start index.js

Right now I have to git push code from my local pc to codecommit and when open putty and run commands above manually every time.现在我必须从我的本地电脑git push代码到代码提交,并且每次打开腻子并手动运行上面的命令。 I wish someone know how to automate this process.我希望有人知道如何自动化这个过程。

My goal is to push code from my local pc to EC2 as fast as possible without logging to EC2 instance with putty every time.我的目标是尽可能快地将代码从我的本地 pc 推送到 EC2,而无需每次都使用 putty 登录到 EC2 实例。

You may want to use Code Pipeline for that.您可能希望为此使用代码管道。 https://aws.amazon.com/codepipeline/ https://aws.amazon.com/codepipeline/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM