Dynamic or Common bitbucket-pipeline.yml file

788 views Asked by At

I am trying to setup the automated deployment through Bitbucket pipeline , but still not succeed might be my business requirement is not fulfill by the Bitbucekt pipeline.

Current Setup :

  1. Dev Team push the code to default branch from their local machines. and as Team lead reviews their code and updated on UAT and production server manually by running the commands on the Server CLI directly.

    #hg branch
    #hg pull
    #hg update
    

Automated deployment we want :

  1. we have 3 environment DEV, UAT/Staging and production.
  2. on the bases of the environments i have created
  3. Release branches . DEV-Release, UAT-Release and PROD-Release respectively.
  4. dev team push the code directly to the default branch dev lead will check the changes and then create a pull request form default to UAT-Release branch and after successful deployment on UAT server the again create Pull request from default to production branch and pipeline should be executed on the pull request and then started copying the bundle.zip on AWS S3 and then to AWS EC2 instance.

Issues :

The issue i am facing is bitbucket-pipeline.yml is not same on all release branches because the branch name s difference due to that when we create a pull request for any release branch we are getting the conflict of that file . id there any why i can use the same bitbucket-pipline.yml file for all the branches and deployment should be happened on that particular for which pull request is created. can we make that file dynamic for all branches with environment variables? if the bitbucket pipeline can not fulfill my business requirement then what is other solution ? if you guys think my business requirement is not good or justifiable just let me know on what step i have to change to achieve the final result of automated deployments

Flow : Developer Machine push to--> Bitbucket default branch ---> Lead will review the code then pull request for any branch (UAT,PROD) --- > pipeline will be executed an push the code to S3 bucket ----> Awscodedeply ---> EC2 application server.

waiting for the prompt response.

0

There are 0 answers