How to install PhantomJS during Pipeline configuration?

Hi,

I'm having a problem installing PhantomJS during the build:

PhantomJS not found on PATH
Phantom installation failed TypeError: Path must be a string. Received undefined at assertPath (path.js:28:11) at Object.join (path.js:1232:7) at findSuitableTempDirectory (/opt/atlassian/pipelines/agent/build/node_modules/phantomjs/install.js:127:30) at /opt/atlassian/pipelines/agent/build/node_modules/phantomjs/install.js:476:19 at nextTickCallback (/opt/atlassian/pipelines/agent/build/node_modules/kew/kew.js:47:28) at _combinedTickCallback (internal/process/next_tick.js:95:7)

The way I'm doing it is:

 - export PHANTOMJS_VERSION=2.1.1
- export PHANTOMJS_PATH=/opt/phantomjs
- export PATH=$PHANTOMJS_PATH/:$PATH
- mkdir -p $PHANTOMJS_PATH
- wget -q https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2
- tar -xf /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PHANTOMJS_PATH/
- rm /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2
- yarn install
- yarn test

Is there anything else I should do? Is there any restriction?

Thanks

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,243 views 8 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you