How to get an ion signal to work with Jenkins (attempt to run through tests with a protractor)

I have a project written using Ionic, and I'm trying to run end-to-end tests (written using Protractor) in Jenkins. This is the script that I use to run the tests:

#make sure ionic serve isn't running kill -9 $(lsof -n -ti4TCP:8100) ./node_modules/protractor/bin/webdriver-manager update --ignore_ssl echo starting ionic serve... screen -d -m -L ionic serve --nolivereload --nobrowser --address localhost echo waiting for ionic to start... while ! curl http://localhost:8100 &>/dev/null; do :; done echo ionic serve started #run end to end tests ./node_modules/.bin/protractor test/e2e/protractor.config.js echo stoping ionic... kill -9 $(lsof -n -ti4TCP:8100) echo stopped. echo done 

If I run this script on the command line, it works fine. But if you pass through Jenkins, he will get to the "expectation of an ionic beginning" and never ends. I saw this question, but starting an "ion service" with an ampersand does not work for me. He runs and leaves immediately. Using the screen is the only way I was able to get it to work.

How can I make ion feed run in the background with Jenkins?

+6
source share

All Articles