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

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

Vyivrain November 13, 2019

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
AUG Leaders

Atlassian Community Events