pantheon-systems / docker-build-tools-ci

Dockerfile source for docker image pantheon-public/build-tools-ci on quay.io
34 stars 39 forks source link

CircleCI Base Image #26

Closed ataylorme closed 5 years ago

ataylorme commented 5 years ago

CircleCI maintains many Docker images, including Node and PHP, both with variants having browsers installed. They also take care of creating an unprivileged user.

I think using circleci/php:7-node-browsers as a base could be beneficial, rather than installing Headless Chrome (required for Behat) ourselves.

Having Node available could also consolidate so we can use the same image for JavaScript-based tests, such as Backstop visual regression

ataylorme commented 5 years ago

Per meeting with @greg-1-anderson and @stevector this sounds like a good idea. I'll explore moving forward after I return from WCEU

mrdavidburns commented 5 years ago

+1 for having node included. Just spent a decent amount of time getting it installed with docker-build-tools-ci so that I could compile Sass.

ataylorme commented 5 years ago

@mrdavidburns have you tried using a Node image for a stand-alone job to compile Sass then persisting the output to a deploy job? The benefit to that approach is you can run the Composer build and Node build in parallel, then take the artifacts from both and run a deploy job. This will be quite a bit faster than one monolithic job building Composer and Node artifacts in sequence.

Here is an example

ataylorme commented 5 years ago

@mrdavidburns I have a PR open for this (#27). You can test the CircleCI PHP + Node + Browser image by using quay.io/pantheon-public/build-tools-ci:from-circleci-php. I've successfully run gulp, lighthouse, and other Node tasks with it.

Having you try it for a second +1 would be great.