This partially a recommendation.
I was not able to find an easy introduction to setup a very basic deployment process using Bitbucket pipeline. During the first steps I do not need any fancy encryption, ....
So my workflow right now (which I inherited) is:
1. Develop stuff
2. Push to repository
3. Pipeline executes tests and builds a downloadable jar file.
4. As I lack the privileges to deploy on the respective machine, an authorized person has to download this jar and runs a local deployment script on the test machine.
5. As I lack the privileges to deploy on the respective machine, an authorized person has to download this jar and runs a local deployment script on the production machine.
I would like to change that, so that it looks basically like:
1. Develop stuff
2. Push to repository (test branch)
3. Pipeline executes tests, builds the project and deploys to test machine.
4. Merge test branch into master
5. Pipeline executes tests, builds the project and deploys to production machine.
It is as easy as that. Yet the whole setup really drives noobies to just use jenkins.
@[deleted] below is a sample pipeline which should achieve the pipeline you've described. Here, we run tests and automated deployments to a test environment from 'feature/*' branches, and run tests with manual deployment to production on 'master'. This models a continuous delivery scenario, where promotion of a release to the production environment is a manual step.
You can remove the manual trigger on the production deployment step to enable automated deployments and achieve continuous deployment.
pipelines:
default:
- step:
name: Run tests
script:
- echo "Execute tests"
branches:
feature/*:
- step:
name: Run tests
script:
- echo "Execute tests"
- step:
name: Deploy to test environment
deployment: test
script:
- echo "Deploying to test environment."
master:
- step:
name: Run tests
script:
- echo "Execute tests"
- step:
name: Deploy to production environment
deployment: production
trigger: manual
script:
- echo "Deploying to production environment."
A more detailed example can be found at https://confluence.atlassian.com/bitbucket/bitbucket-deployments-940695276.html
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.