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

Issue with running rails 5(with webpack) selenium in bitbucket pipelines

Hello, having issue with running headless chrome selenium. Locally everything works.

Basically this step of integration tests I want to run:

pipelines:
default: 
- step:
name: Integration tests
image: ruby:2.5.1
caches:
- bundler
- node
script:
- export DATABASE_URL=postgresql://test_user:test_user_password@localhost/pipelines
- bundle install --path vendor/bundle
- mv config/deploy/database.ci.yml config/database.yml

# Install dependencies that chrome and chromedriver will need
- apt-get update && apt-get install -yq libnss3 unzip openjdk-8-jre-headless xvfb libxi6 libgconf-2-4

# Install chrome browser and chromedriver
- curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
- echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
- apt-get -y update
- apt-get -y install google-chrome-stable
- wget https://chromedriver.storage.googleapis.com/78.0.3904.70/chromedriver_linux64.zip
- unzip chromedriver_linux64.zip
- mv chromedriver /usr/bin/chromedriver
- chown root:root /usr/bin/chromedriver
- chmod +x /usr/bin/chromedriver

# Install node
- apt-get -qq install gnupg
- curl -sL https://deb.nodesource.com/setup_10.x | bash -
- apt-get install -y build-essential
- apt-get install -y nodejs
- apt-get update

- npm install

- RAILS_ENV=test bundle exec rspec spec/features/tests
services:
- postgres
- redis

 This gives me error: 

Webpacker can't find platform in /opt/atlassian/pipelines/agent/build/public/packs-test/manifest.json 

Found that I possibly need to add a command before:

NODE_ENV=test bundle exec rails webpacker:compile

But after that another error rises:

TypeError: no implicit conversion of nil into String/opt/atlassian/pipelines/agent/build/config/application.rb:26:in `<class:Application>'

This looks like an error in app itself, but again running webpack compile locally works fine, so it doesn't look like problem with app code.

Anything I'm missing? 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,027 views 0 3
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