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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage
Highlighted

Pipline order.

Hello everyone. I have a problem with pipeline and I don't know what to do. 

If I create PR it starts CI pipeline for it, but if I commit something new before I merged PR, two new pipelines start parallel: 'commit pipeline' and 'PR pipeline'.  Problem is that I need 'PR pipeline' to start after 'commit pipeline' (it use docker image from 'commit pipeline'). Any ideas? Sorry for my English)

2 comments

Hi @Nick 

Can you please share how you have configured your pipelines? As far as I know, there should be only one pipeline running for the commits you pushed.

options:
docker: true

pipelines:
default:
- step:
name: Build
script:
- echo ${BITBUCKET_BUILD_NUMBER}
- docker login --username oauth --password $YANDEX_OAUTH cr.yandex
- docker pull cr.yandex/${YANDEX_REESTR}/${BITBUCKET_REPO_FULL_NAME,,}:latest && export CACHE_PARAM="--cache-from ${CI_REGISTRY_IMAGE}/${BITBUCKET_REPO_FULL_NAME,,}:latest" || export CACHE_PARAM=""
- docker build ${CACHE_PARAM} -t cr.yandex/${YANDEX_REESTR}/${BITBUCKET_REPO_FULL_NAME,,}:${BITBUCKET_BUILD_NUMBER} -t cr.yandex/${YANDEX_REESTR}/${BITBUCKET_REPO_FULL_NAME,,}:latest .
- docker push cr.yandex/${YANDEX_REESTR}/${BITBUCKET_REPO_FULL_NAME,,}:${BITBUCKET_BUILD_NUMBER}
- docker push cr.yandex/${YANDEX_REESTR}/${BITBUCKET_REPO_FULL_NAME,,}:latest
- step:
name: Deploy to dev
script:
- echo "Deploy to dev"
- step:
name: Rollback dev
trigger: manual
script:
- echo "Rollback dev"

pull-requests:
'**':
- step:
name: Deploy to stage
script:
- echo "Some message"
- step:
name: Deploy to stage
trigger: manual
script:
- echo "Deploy to stage"
- step:
name: Rollback stage
trigger: manual
script:
- echo "Rollback stage"

branches:
master:
- step:
name: Deploy to prod
script:
- echo "Deploy to prod"
- step:
name: Rollback prod
trigger: manual
script:
- echo "Rollback prod" 

Hi @Lenin Raj Rajasekaran  That's my pipline. Two parallel piplines start with opened pull-request and new commit

Screenshot from 2020-01-19 23-49-29.png

I need to start 'pull request pipline' after 'commit pipline')) 

May be any best practices how can I change my piplines?

THX

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

2,120 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you