Skip to content

Commit

Permalink
feat(included): generate new image with version 12.3.0 (#811)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyrohrbough committed Jan 3, 2023
1 parent f47090e commit 5f5272a
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 9 deletions.
18 changes: 9 additions & 9 deletions circle.yml
Expand Up @@ -431,21 +431,21 @@ workflows:
build-included-images:
jobs:
- build-included-image:
name: "build+test included 12.2.0 arm64"
dockerTag: "12.2.0"
name: "build+test included 12.3.0 arm64"
dockerTag: "12.3.0"
resourceClass: arm.large
platformArg: linux/arm64
- build-included-image:
name: "build+test included 12.2.0 x64"
dockerTag: "12.2.0"
name: "build+test included 12.3.0 x64"
dockerTag: "12.3.0"
resourceClass: large
platformArg: linux/amd64
- push-images:
name: "push included 12.2.0 images"
name: "push included 12.3.0 images"
dockerName: 'cypress/included'
dockerTag: '12.2.0'
workingDirectory: '~/project/included/12.2.0'
dockerTag: '12.3.0'
workingDirectory: '~/project/included/12.3.0'
context: test-runner:docker-push
requires:
- "build+test included 12.2.0 arm64"
- "build+test included 12.2.0 x64"
- "build+test included 12.3.0 arm64"
- "build+test included 12.3.0 x64"
67 changes: 67 additions & 0 deletions included/12.3.0/Dockerfile
@@ -0,0 +1,67 @@
# WARNING: this file was autogenerated by generate-included-image.js
# using
# npm run add:included -- 12.3.0 cypress/browsers:node16.16.0-chrome107-ff107-edge
#
# build this image with command
# docker build -t cypress/included:12.3.0 .
#
FROM cypress/browsers:node16.16.0-chrome107-ff107-edge

# avoid too many progress messages
# https://github.com/cypress-io/cypress/issues/1243
ENV CI=1 \
# disable shared memory X11 affecting Cypress v4 and Chrome
# https://github.com/cypress-io/cypress-docker-images/issues/270
QT_X11_NO_MITSHM=1 \
_X11_NO_MITSHM=1 \
_MITSHM=0 \
# point Cypress at the /root/cache no matter what user account is used
# see https://on.cypress.io/caching
CYPRESS_CACHE_FOLDER=/root/.cache/Cypress \
# Allow projects to reference globally installed cypress
NODE_PATH=/usr/local/lib/node_modules

# CI_XBUILD is set when we are building a multi-arch build from x64 in CI.
# This is necessary so that local `./build.sh` usage still verifies `cypress` on `arm64`.
ARG CI_XBUILD

# should be root user
RUN echo "whoami: $(whoami)" \
&& npm config -g set user $(whoami) \
# command "id" should print:
# uid=0(root) gid=0(root) groups=0(root)
# which means the current user is root
&& id \
&& npm install -g typescript \
&& npm install -g "cypress@12.3.0" \
&& (node -p "process.env.CI_XBUILD && process.arch === 'arm64' ? 'Skipping cypress verify on arm64 due to SIGSEGV.' : process.exit(1)" \
|| (cypress verify \
# Cypress cache and installed version
# should be in the root user's home folder
&& cypress cache path \
&& cypress cache list \
&& cypress info \
&& cypress version)) \
# give every user read access to the "/root" folder where the binary is cached
# we really only need to worry about the top folder, fortunately
&& ls -la /root \
&& chmod 755 /root \
# always grab the latest Yarn
# otherwise the base image might have old versions
# NPM does not need to be installed as it is already included with Node.
&& npm i -g yarn@latest \
# Show where Node loads required modules from
&& node -p 'module.paths' \
# should print Cypress version
# plus Electron and bundled Node versions
&& cypress version \
&& echo " node version: $(node -v) \n" \
"npm version: $(npm -v) \n" \
"yarn version: $(yarn -v) \n" \
"typescript version: $(tsc -v) \n" \
"debian version: $(cat /etc/debian_version) \n" \
"user: $(whoami) \n" \
"chrome: $(google-chrome --version || true) \n" \
"firefox: $(firefox --version || true) \n"

ENTRYPOINT ["cypress", "run"]
20 changes: 20 additions & 0 deletions included/12.3.0/README.md
@@ -0,0 +1,20 @@
<!--
WARNING: this file was autogenerated by generate-included-image.js using
npm run add:included -- 12.3.0 cypress/browsers:node16.16.0-chrome107-ff107-edge
-->

# cypress/included:12.3.0

Read [Run Cypress with a single Docker command][blog post url]

## Run tests

```shell
$ docker run -it -v $PWD:/e2e -w /e2e cypress/included:12.3.0
# runs Cypress tests from the current folder
```

**Note:** Currently, the linux/arm64 build of this image does not contain any browsers except Electron. See https://github.com/cypress-io/cypress-docker-images/issues/695 for more information.

[blog post url]: https://www.cypress.io/blog/2019/05/02/run-cypress-with-a-single-docker-command/
8 changes: 8 additions & 0 deletions included/12.3.0/build.sh
@@ -0,0 +1,8 @@
# WARNING: this file was autogenerated by generate-included-image.js
# using
# npm run add:included -- 12.3.0 cypress/browsers:node16.16.0-chrome107-ff107-edge
set e+x

LOCAL_NAME=cypress/included:12.3.0
echo "Building $LOCAL_NAME"
docker build -t $LOCAL_NAME .
1 change: 1 addition & 0 deletions included/CHANGELOG.md
Expand Up @@ -111,3 +111,4 @@ Name + Tag | Base image
[cypress/included:12.0.2](12.0.2) | `cypress/browsers:node16.16.0-chrome107-ff107-edge`
[cypress/included:12.1.0](12.1.0) | `cypress/browsers:node16.16.0-chrome107-ff107-edge`
[cypress/included:12.2.0](12.2.0) | `cypress/browsers:node16.16.0-chrome107-ff107-edge`
[cypress/included:12.3.0](12.3.0) | `cypress/browsers:node16.16.0-chrome107-ff107-edge`
1 change: 1 addition & 0 deletions included/README.md
Expand Up @@ -117,6 +117,7 @@ Name + Tag | Base image
[cypress/included:12.0.2](12.0.2) | `cypress/browsers:node16.16.0-chrome107-ff107-edge`
[cypress/included:12.1.0](12.1.0) | `cypress/browsers:node16.16.0-chrome107-ff107-edge`
[cypress/included:12.2.0](12.2.0) | `cypress/browsers:node16.16.0-chrome107-ff107-edge`
[cypress/included:12.3.0](12.3.0) | `cypress/browsers:node16.16.0-chrome107-ff107-edge`

This image should be enough to run Cypress tests headlessly or in the interactive mode with a single Docker command like this:

Expand Down

0 comments on commit 5f5272a

Please sign in to comment.