-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
bajtos
commented
Sep 30, 2019
d16698b to
97cfd3c
Compare
bajtos
commented
Sep 30, 2019
The build is failing on cis-jenkins because we don't have Chrome installed in the docker image used to run them. I opened a PR to add Chrome, now I am waiting for @rmg to help me get that change landed and published to production.
39ab65a to
9dd2257
Compare
hacksparrow
commented
Sep 30, 2019
Much better choice. What about the CI failures?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you change this to ChromiumHeadless it might "just work" since Chromium is installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In c772233, I added a check to see if chromium or chromium-browser is in PATH and then use ChromiumHeadless instead of ChromeHeadless. Unfortunately, it seems the check did not pass, because the build is still using Chrome (not Chromium):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Below is the Dockerfile I am using to test my setup, it's based on our build images.
### ### Copied from Jenkins base Dockerfile ### FROM ubuntu:xenial # Declared first so that during build, nothing ever gets accidentally persisted VOLUME /tmp # Simple wrapper for apt-get install that does an update before install and # cleanup after install to ensure that the resulting layer doesn't contain # anything extra COPY docker-friendly-apt-install.sh /bin/docker-friendly-apt-install # Ensure that package don't give us any trouble when we install them RUN echo 'DPkg::options { "--force-confdef"; "--force-confnew"; }' \ > /etc/apt/apt.conf.d/60local # Use bash by default instead of dash RUN echo "dash dash/sh boolean false" | debconf-set-selections \ && DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash # Set our locale to use UTF-8 by default RUN docker-friendly-apt-install locales \ && locale-gen en_US.UTF-8 \ && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' # ssh and some additional packages that are sufficiently common/popular that # they are probably wanted/needed in all images. RUN docker-friendly-apt-install \ ca-certificates \ apt-transport-https \ wget \ curl \ git \ openssh-server \ zip \ unzip \ bzip2 \ xz-utils \ bash \ rsync \ jq ### ### Install Chromium - see xvfb/Dockerfile ### # For running protractor/selenium based tests # libgconf-2-4 is a dependency of the selenium chromedriver RUN docker-friendly-apt-install xvfb chromium-chromedriver libgconf-2-4 ### ### Setup Node environment ### # Install nvm RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash RUN source ~/.nvm/nvm.sh && nvm install 12 ### ### Run our tests ### ENV CI=true ENV JENKINS_HOME=/tmp COPY "." "." CMD ["/bin/bash", "-c", "source ~/.nvm/nvm.sh && nvm run 12 ./node_modules/.bin/grunt karma:unit-once"]
I am running the following command to build & run the tests:
docker build -t loopback-core-tests . && docker run -it loopback-core-tests
When I run this on my machine, Chromium is correctly picked and all tests pass.
@rmg could you please help me to investigate why my tests are failing on cis-jenkins?
tomleah
commented
Sep 30, 2019
@tomleah it makes me wonder if we can enable browser tests on
ppc64ands390xplatform, now that we are using Headless Chrome instead of PhantomJS. What do you think? (These two platforms were disabled by your commit 0dac936.)
As long as Headless Chrome works on those platforms I don't see why not @bajtos. I no longer have access to ppc64 or s390x machines so I'm unable to check this however
c772233 to
a182075
Compare
Rework browser tests to run in Headless Chrome instead of PhantomJS, because the latter is no longer maintained. This allows us to remove transpilation to ES5 via babelify, which significantly improves speed of our tests. Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
See the discussion in docker/for-linux#496 Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
rmg
commented
Oct 2, 2019
@slnode test please
rmg
commented
Oct 2, 2019
I made an adjustment to the Jenkins config - it was previously using a minimal image that lacked chromium-browser instead of a more standard image that has it.
bajtos
commented
Oct 3, 2019
I made an adjustment to the Jenkins config - it was previously using a minimal image that lacked
chromium-browserinstead of a more standard image that has it.
Thank you a lot, @rmg! 🙇
Rework browser tests to run in Headless Chrome instead of PhantomJS, because the latter is no longer maintained.
This allows us to remove transpilation to ES5 via babelify, which significantly improves speed of our tests.
Fixes #4252
Checklist