Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unzip to factory #1015

Merged
merged 2 commits into from
Feb 16, 2024
Merged

Conversation

CamilleDrapier
Copy link
Contributor

This is an attempt to solve: #1013

This is based on the documentation in README/CONTRIBUTING, but I might have misunderstood something, please let me know if that is the case.

After making these changes, I ran the following (for some reason, the images built with 'included' does not seem to work, and I am unsure why):

$docker compose build factory

[+] Building 2.2s (8/8) FINISHED                                                                                                                                                                                             docker:default
 => [factory internal] load build definition from factory.Dockerfile                                                                                                                                                                   0.0s
 => => transferring dockerfile: 4.92kB                                                                                                                                                                                                 0.0s
 => [factory internal] load metadata for docker.io/library/debian:bullseye-slim                                                                                                                                                        2.2s
 => [factory internal] load .dockerignore                                                                                                                                                                                              0.0s
 => => transferring context: 2B                                                                                                                                                                                                        0.0s
 => [factory 1/3] FROM docker.io/library/debian:bullseye-slim@sha256:c6d9e246479d56687c1a579a7a0336956a5ce6f2bc26bd7925b0c7405e81dbff                                                                                                  0.0s
 => [factory internal] load build context                                                                                                                                                                                              0.0s
 => => transferring context: 1.14kB                                                                                                                                                                                                    0.0s
 => CACHED [factory 2/3] RUN ls -la /root   && chmod 777 /root   && apt-get update   && apt-get install --no-install-recommends -y     xvfb     libglib2.0-0     libnss3     libatk1.0-0     libatk-bridge2.0-0     libcups2     libg  0.0s
 => CACHED [factory 3/3] COPY ./installScripts /opt/installScripts                                                                                                                                                                     0.0s
 => [factory] exporting to image                                                                                                                                                                                                       0.0s
 => => exporting layers                                                                                                                                                                                                                0.0s
 => => writing image sha256:198c7b4cf37b64c61667309afb4923763dc4a52507fc360bb5c7c32fdb5c4253                                                                                                                                           0.0s
 => => naming to docker.io/cypress/factory                                                                                                                                                                                             0.0s
 => => naming to docker.io/cypress/factory:latest                                                                                                                                                                                      0.0s
 => => naming to docker.io/cypress/factory:3.5.1

$ docker-compose build browsers

[+] Building 2.4s (12/12) FINISHED                                                                                                                                                                                           docker:default
 => [browsers internal] load build definition from Dockerfile                                                                                                                                                                          0.0s
 => => transferring dockerfile: 372B                                                                                                                                                                                                   0.0s
 => [browsers internal] load metadata for docker.io/cypress/factory:3.5.1                                                                                                                                                              0.0s
 => [browsers internal] load .dockerignore                                                                                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                                                                                        0.0s
 => [browsers default_image 1/1] FROM docker.io/cypress/factory:3.5.1                                                                                                                                                                  0.0s
 => CACHED [browsers default_image 2/1] RUN bash /opt/installScripts/node/install-node-version.sh 20.11.0                                                                                                                              0.0s
 => CACHED [browsers default_image 3/1] RUN node /opt/installScripts/yarn/install-yarn-version.js 1.22.19                                                                                                                              0.0s
 => CACHED [browsers default_image 4/1] RUN node /opt/installScripts/chrome/install-chrome-version.js 121.0.6167.85-1                                                                                                                  0.0s
 => CACHED [browsers default_image 5/1] RUN node /opt/installScripts/edge/install-edge-version.js 121.0.2277.83-1                                                                                                                      0.0s
 => CACHED [browsers default_image 6/1] RUN node /opt/installScripts/firefox/install-firefox-version.js 120.0                                                                                                                          0.0s
 => [browsers default_image 7/1] RUN node /opt/installScripts/cypress/install-cypress-version.js ${CYPRESS_VERSION}                                                                                                                    0.3s
 => [browsers default_image 8/1] RUN apt-get purge -y --auto-remove     curl     bzip2     gnupg     dirmngr  && rm -rf /usr/share/doc   && rm -rf /usr/share/man   && rm -rf /var/lib/apt/lists/*   && rm -rf /opt/installScripts     2.1s
 => [browsers] exporting to image                                                                                                                                                                                                      0.0s
 => => exporting layers                                                                                                                                                                                                                0.0s
 => => writing image sha256:6ec5f82f945214d52f8dca0c088a31f6333222a8b86802ec475c970187d0be04                                                                                                                                           0.0s
 => => naming to docker.io/cypress/browsers                                                                                                                                                                                            0.0s
 => => naming to docker.io/cypress/browsers:latest                                                                                                                                                                                     0.0s
 => => naming to docker.io/cypress/browsers:node-20.11.0-chrome-121.0.6167.85-1-ff-120.0-edge-121.0.2277.83-1                                                                                                                          0.0s

$ docker run -it sha256:6ec5f82f945214d52f8dca0c088a31f6333222a8b86802ec475c970187d0be04

$ root@a52685de7248:/# unzip
UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.

Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
  Default action is to extract files in list, except those in xlist, to exdir;
  file[.zip] may be a wildcard.  -Z => ZipInfo mode ("unzip -Z" for usage).

  -p  extract files to pipe, no messages     -l  list files (short format)
  -f  freshen existing files, create none    -t  test compressed archive data
  -u  update files, create if necessary      -z  display archive comment only
  -v  list verbosely/show version info       -T  timestamp archive to latest
  -x  exclude files that follow (in xlist)   -d  extract files into exdir
modifiers:
  -n  never overwrite existing files         -q  quiet mode (-qq => quieter)
  -o  overwrite files WITHOUT prompting      -a  auto-convert any text files
  -j  junk paths (do not make directories)   -aa treat ALL files as text
  -U  use escapes for all non-ASCII Unicode  -UU ignore any Unicode fields
  -C  match filenames case-insensitively     -L  make (some) names lowercase
  -X  restore UID/GID info                   -V  retain VMS version numbers
  -K  keep setuid/setgid/tacky permissions   -M  pipe through "more" pager
See "unzip -hh" or unzip.txt for more help.  Examples:
  unzip data1 -x joe   => extract all files except joe from zipfile data1.zip
  unzip -p foo | more  => send contents of foo.zip via pipe into program more
  unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer
root@a52685de7248:/# exit

@CLAassistant
Copy link

CLAassistant commented Feb 15, 2024

CLA assistant check
All committers have signed the CLA.

@cypress-app-bot
Copy link

@jennifer-shehane
Copy link
Member

@CamilleDrapier What did you mean by 'does not seem to work' in this statement?

the images built with 'included' does not seem to work

@CamilleDrapier
Copy link
Contributor Author

Sorry @jennifer-shehane , this was a bit unclear from me!

Here is what I get when I try the included way:

$ docker compose build factory

 => [factory internal] load build definition from factory.Dockerfile                                                                                                                                                                   0.0s
 => => transferring dockerfile: 4.92kB                                                                                                                                                                                                 0.0s
 => [factory internal] load metadata for docker.io/library/debian:bullseye-slim                                                                                                                                                        0.7s
 => [factory internal] load .dockerignore                                                                                                                                                                                              0.0s
 => => transferring context: 2B                                                                                                                                                                                                        0.0s
 => [factory 1/3] FROM docker.io/library/debian:bullseye-slim@sha256:c6d9e246479d56687c1a579a7a0336956a5ce6f2bc26bd7925b0c7405e81dbff                                                                                                  0.0s
 => [factory internal] load build context                                                                                                                                                                                              0.0s
 => => transferring context: 1.14kB                                                                                                                                                                                                    0.0s
 => CACHED [factory 2/3] RUN ls -la /root   && chmod 777 /root   && apt-get update   && apt-get install --no-install-recommends -y     xvfb     libglib2.0-0     libnss3     libatk1.0-0     libatk-bridge2.0-0     libcups2     libg  0.0s
 => CACHED [factory 3/3] COPY ./installScripts /opt/installScripts                                                                                                                                                                     0.0s
 => [factory] exporting to image                                                                                                                                                                                                       0.0s
 => => exporting layers                                                                                                                                                                                                                0.0s
 => => writing image sha256:198c7b4cf37b64c61667309afb4923763dc4a52507fc360bb5c7c32fdb5c4253                                                                                                                                           0.0s
 => => naming to docker.io/cypress/factory                                                                                                                                                                                             0.0s
 => => naming to docker.io/cypress/factory:latest                                                                                                                                                                                      0.0s
 => => naming to docker.io/cypress/factory:3.5.1                                                                                                                                                                                       0.0s

$ docker compose build included

+] Building 0.1s (12/12) FINISHED                                                                                                                                                                                           docker:default
 => [included internal] load build definition from Dockerfile                                                                                                                                                                          0.0s
 => => transferring dockerfile: 372B                                                                                                                                                                                                   0.0s
 => [included internal] load metadata for docker.io/cypress/factory:3.5.1                                                                                                                                                              0.0s
 => [included internal] load .dockerignore                                                                                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                                                                                        0.0s
 => [included included_image 1/1] FROM docker.io/cypress/factory:3.5.1                                                                                                                                                                 0.0s
 => CACHED [included included_image 2/1] RUN bash /opt/installScripts/node/install-node-version.sh 20.11.0                                                                                                                             0.0s
 => CACHED [included included_image 3/1] RUN node /opt/installScripts/yarn/install-yarn-version.js 1.22.19                                                                                                                             0.0s
 => CACHED [included included_image 4/1] RUN node /opt/installScripts/chrome/install-chrome-version.js 121.0.6167.85-1                                                                                                                 0.0s
 => CACHED [included included_image 5/1] RUN node /opt/installScripts/edge/install-edge-version.js 121.0.2277.83-1                                                                                                                     0.0s
 => CACHED [included included_image 6/1] RUN node /opt/installScripts/firefox/install-firefox-version.js 120.0                                                                                                                         0.0s
 => CACHED [included included_image 7/1] RUN node /opt/installScripts/cypress/install-cypress-version.js 13.6.4                                                                                                                        0.0s
 => CACHED [included included_image 8/1] RUN apt-get purge -y --auto-remove     curl     bzip2     gnupg     dirmngr  && rm -rf /usr/share/doc   && rm -rf /usr/share/man   && rm -rf /var/lib/apt/lists/*   && rm -rf /opt/installSc  0.0s
 => [included] exporting to image                                                                                                                                                                                                      0.0s
 => => exporting layers                                                                                                                                                                                                                0.0s
 => => writing image sha256:2fab5df2ee77dca783b36d3b43e20aa26579b70723038a2838e0251a1e707028                                                                                                                                           0.0s
 => => naming to docker.io/cypress/included                                                                                                                                                                                            0.0s
 => => naming to docker.io/cypress/included:latest                                                                                                                                                                                     0.0s
 => => naming to docker.io/cypress/included:13.6.4                                                                                                                                                                                     0.0s
 => => naming to docker.io/cypress/included:cypress-13.6.4-node-20.11.0-chrome-121.0.6167.85-1-ff-120.0-edge-121.0.2277.83-1                                                                                                           0.0s

$ docker run -it sha256:2fab5df2ee77dca783b36d3b43e20aa26579b70723038a2838e0251a1e707028


DevTools listening on ws://127.0.0.1:38739/devtools/browser/dcf7276d-ad8d-49f0-8523-5be7ec0b0a1a
[287:0216/102032.821534:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type: 
Could not find a Cypress configuration file in this folder: /

The penultimate line is probably nothing serious, and can be ignored as you mentioned in cypress-io/cypress#28061 (comment)

The last line, I'm unsure about it, I was assuming that there is something I'm missing when running this (and that the CI is checking properly?); but I was unable to identify what so far 🙇

@jennifer-shehane
Copy link
Member

Ah, yeah, I believe these can be ignored.

@jennifer-shehane jennifer-shehane merged commit 85614e4 into cypress-io:master Feb 16, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants