Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

How do I use build setup step for parallel spec?

I have setup a bitbucket-pipeline with one build setup step and two parallel setup. However, while getting through parallel setup it cannot find packages installed from build setup step and fails. How can I make the parallel setup use packages from build setup? Or should I do this separately for parallel setup? 

image: ruby:2.6.3-alpine3.8

pipelines:
branches:
test-branch:
- step:
name: Build setup
caches:
- bundler
script:
- apk add --no-cache git
- apk add build-base
- apk add postgresql-client
- apk add postgresql-dev
- apk add tzdata
- apk add nodejs
- apk add nodejs-npm
- apk add yarn
- npm install
- yarn install
- gem install bundler -v 1.17.3
- gem install nokogiri -v 1.10.3
- gem install pg -v 1.1.4
- bundle install
- export RAILS_ENV=test
- bundle exec rake db:drop RAILS_ENV=test
- bundle exec rake db:create RAILS_ENV=test
- bundle exec rake db:migrate RAILS_ENV=test
- bundle exec rake db:migrate RAILS_ENV=test
services:
- postgres
- parallel:
- step:
name: Yarn tests
script:
- yarn test
- step:
name: Rspecs
script:
- bundle exec rspec

definitions:
caches:
bundler: ./vendor
services:
postgres:
image: postgres:9.5.17
environment:
POSTGRES_DB: test_db
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testuser

1 answer

0 votes

Hi @Bibek Khadka

Each step of your pipeline will use a fresh docker image to run the commands you have there. The correct way to share information between steps running in a sequence is by using artifacts:

In case you want to have some packages already installed before your build, you will need to create a docker image with them already installed and use that image in your step.

I hope that clarifies this scenario.

Thanks @Daniel Santos , I just went with using docker-compose instead.

Like Daniel Santos likes this

Awesome man! What matters the most is you achieving your goal!
Thanks for sharing it!

Like Bibek Khadka likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Staying organized with Jira: best practices for a better project management

Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...

241 views 2 1
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