简体   繁体   中英

Git auto deploy with bitbucket pipline - only production?

I want to start using the Bitbucket Pipelines for auto deploy but I have a problem. I am following this tutorial . As I understand, the Bitbucket Pipelines will push my code to my server after every commit but I have 2 FTP servers: dev and prod.

I want to decide if I want to push to dev or production FTP server.

You can use the branch you push to to make a choice of which server to deploy to:

 branches:
   'master':
   - step:

This will run the step on the master branch only. So you can step the pipeline to deploy to production. You can then use this to deploy another branch to Dev. Use the default step to just run unit tests. Therefore master goes to production. Develop goes to Dev Default just runs unit tests.

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