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