The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
Issue with-- Jest preset plugin
I used Jest preset plugin to run jest -puppeteer tests in a docker container. Worked fine locally. However when running through remote jenkins, it fails to start docker container?
Jenkins cannot start docker container
Followed the instructions on the page …tests run fine in docker only locally https://www.npmjs.com/package/jest-puppeteer-docker. Below is the error…
14:48:20 Successfully built 05a128b6706e 14:48:20 Successfully tagged docker_chromium:latest 14:48:20 14:48:20 Building chromium 14:48:20 14:48:20 Docker Chromium: Successfully built Docker image 14:48:20 Docker Chromium: Starting Docker container… 14:48:20 Error: Docker Chromium: Failed to start Docker container 14:48:20 14:48:20 Internal Error: 14:48:20 14:48:20 Error: Command failed: docker-compose -f “/data/jenkins/workspace/MadService_automation_test_run/node_modules/docker-chromium/docker/docker-compose.yml” up -d chromium 14:48:20 Creating docker_chromium_1 … 14:48:20 Creating docker_chromium_1 14:48:20 e[1Ae[2K Creating docker_chromium_1 … e[31merrore[0m e[1B 14:48:20 ERROR: for docker_chromium_1 Cannot create container for service chromium: invalid port specification: “None” 14:48:20 14:48:20 ERROR: for chromium Cannot create container for service chromium: invalid port specification: “None” 14:48:20 Encountered errors while bringing up the project. 14:48:20 14:48:20 at dockerUp (/data/jenkins/workspace/MadService_automation_test_run/node_modules/docker-chromium/lib/index.js:82:15) 14:48:20 at <anonymous> 14:48:20 npm ERR! code ELIFECYCLE 14:48:20 npm ERR! errno 1 14:48:20 npm ERR! firstname.lastname@example.org test-automation:
jest --verbose --config=automation/config/jest.config.js 14:48:20 npm ERR! Exit status 1 14:48:20 npm ERR!
Hi! Thanks for taking the time to file a bug report!
$ npm --versions 5.6.0 $ node -p process.platform darwin
Cannot understand this error
I think the error is coming from this command, but I am not sure why:
docker-compose -f "/data/jenkins/workspace/MadService_automation_test_run/node_modules/docker-chromium/docker/docker-compose.ym"” up -d chromium
This older issue describes interaction between docker-compose and python versions with similar error: https://github.com/docker/compose/issues/4729
out of the 2 solution,
- downgrade python
- downgrade docker-compose
I want to try for ‘downgrade docker-compose’ one as I am not using python at all. As I am using the image from https://github.com/alpeware/chrome-headless-trunk I do not know how I could downgrade docker compose to use with jenkins.Locally downgrading the docker-compose still works. But issue is how to achieve the same on remote jenkins. Also the error ’ Cannot create container for service chromium: invalid port specification: “None”’ is about invalid port. ow I can change that when image is being downloaded dynamically in jenkins Please help
It looks like a problem with docker-compose on a Jenkins server, so help in this npm forum will be limited! I don’t know if downgrading docker-compose will help.
ports: - '9222:9222'
For some reason this format is not recognised by the
docker-compose on your Jenkins server.
Is there another way ports: can be specified?