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

I'm not sure if this is bitbucket's issue or a docker issue since the bitbucket file looks a lot lik

jpstokes June 2, 2020

I'm not sure if this is bitbucket's issue or a docker issue since the bitbucket file looks a lot like it might be using docker-compose/docker behind the scenes. However, I could not find this exact problem anywhere and the solutions I did find didn't work. I'm not too sure about the environment section I added. I added that in another attempt to get it working. This is my bitbucket-pipelines.yml

 

image: ruby:2.5.1
environment:
  - BUNDLE_PATH=vendor/bundle

pipelines:
  default:
    - step:        name: Bundle Install        caches:
          - bundler
        script:
          - apt-get update
          - apt-get install -y qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x
          - export DATABASE_URL=postgresql://test_user:test_user_password@localhost/pipelines
          - bundle install --binstubs
          - bundle install --path vendor/bundle
        services:
          - redis
          - postgres
    - step:        name: Initialize databases
        caches:
          - bundler
        script:
          - RAILS_ENV=development bundle exec rake db:setup
          - RAILS_ENV=test bundle exec rake db:test:prepare
        services:
          - postgres
          - redis
    - step:        name: Test        caches:
          - bundler
        script:
          - bundle exec rake
        services:
          - postgres
          - redis

definitions:  services:    postgres:      image: postgres
      environment:        POSTGRES_DB: pipelines
        POSTGRES_USER: test_user
        POSTGRES_PASSWORD: test_user_password
    redis:      image: redis
  caches:    bundler: vendor/bundle

When it gets to the initialize database step, it can't find the rake command:

+ RAILS_ENV=development bundle exec rake db:setup
bundler: failed to load command: rake (/usr/local/bin/rake)
Bundler::GemNotFound: Could not find rake-12.3.3 in any of the sources

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events