简体   繁体   中英

Jenkins - Update Github project repo inside Docker image when merging master

I'm making integration test repo which stays inside the Docker image running on the AWS instance. Actually, whenever i wanna update the integration test scripts from GitHub to AWS instance, i need to ssh manually to instance then type the command git pull to get the latest code from GitHub repo contains the test scripts. My intention is whenever there's a merge action in GitHub repo (master branch) , i want Jenkins to automatically update it to the integration test repo in my AWS instance, so that the testing won't be obsoleted somehow (in holidays and no one in charges for update the scripts).

So, could anyone give me recommendation and idea to make it ?

Thanks a lot

What do you think about cron on the docker container? Inside that cron command you'd git fetch remote repository and check if there are any changes that should be applied. If so the same cron command could perform git pull .

That'd require to write some script that's going to be executed in crontab. Please also remember about monitoring it somehow - cron that's not monitored does not execute ;).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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