Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,459,127
Community Members
 
Community Events
176
Community Groups

Deploy code to custom server

Hi, my servers are not in Amazon or some similar hosting. How can I deploy my code to a custom webserver? Is there some tutorial for this?

Now I am deploying from my dev server, where I am starting a script, wchich is copyng all the code to my prod server with scp. How to do this from bitbucket deployment?

Thanks!

Nik

1 comment

Marty Atlassian Team Feb 09, 2019

Hi Nikolay,

Just confirming that you're using Bitbucket Cloud (bitbucket.org) rather than Bitbucket S Server (your own installation)?

If you are using Bitbucket Cloud, are you using Bitbucket Pipelines?

If so, you can set up custom deployment using Pipelines - here is a guide: https://confluence.atlassian.com/bitbucket/bitbucket-deployments-940695276.html

I hope that helps!

Like Nikolay Nikolov likes this

Hi Martyn, thanks!

I will play a bit with this deployment settings.

I have another question. When I use the steps for example for the branch feature/*

feature/*:
- step:
name: Build feature
script:
- echo "done Tests"
- step:
name: Deploy to staging
deployment: staging
trigger: manual
script:
- sh deploy/deploy.sh "staging" $BITBUCKET_BRANCH
- step:
name: Deploy to production
deployment: production
trigger: manual
script:
- sh deploy/deploy.sh "production" $BITBUCKET_BRANCH

Then I can not deploy direct to production, without to deploy to staging. Is there some possibility, where the QA can choose, where to deploy?

For example I want to set 3 feature servers, where the QA can deploy to test the branch:

Deploy to qa_server1 

Deploy to qa_server2

Deploy to qa_server3

At this moment the QA can not deploy direct to qa_server3, without to deploy on qa_server1 and qa_server2 .

How can I solve this?

Marty Atlassian Team Feb 10, 2019

Hi Nikolay,

 

One option to try is to use a number of custom pipelines.

Each custom pipeline must be triggered manually, and when you trigger it you can select which pipeline to trigger. 

You can read more about custom pipelines here: https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html#Configurebitbucket-pipelines.yml-ci_custom

So you could have the following pipelines:

1. Build feature (automatic) - would have only one step from your existing pipeline above*

2. Deploy to qa_server1

3. Deploy to qa_server2

4. Deploy to qa_server3

5. Deploy to production

 

I hope that helps!

Hi Martyn, how can I add custom script only for the branches feature/* 

Is this possible?

Marty Atlassian Team Feb 10, 2019

Do you mean get a pipeline to run for only some branches?

Here is an example to do just that: https://confluence.atlassian.com/bitbucket/branch-workflows-856697482.html 

Marty Atlassian Team Feb 10, 2019

If you're trying to get a step to run only for feature/* branches, you could run the custom script for every branch but add logic to the script that only executes certain steps based on the branch name.

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events