Skip to content

Command line options lost when running Percy & Cypress in docker-compose #1145

Description

@CynanX

Hi,

We run Cypress in a GitLab pipeline, using docker compose to start up various services, along with running Cypress.

I've managed to run Percy and Cypress stand alone, outside of docker compose locally and it seems to works fine. However, when running this inside of docker compose it appears that command line options are lost when being passed to Cypress.

Here is a snipper of my docker compose file which works fine.

cypress:
    image: 116147290797.dkr.ecr.eu-west-1.amazonaws.com/squadihp/build-images:cypress-latest
    network_mode: host
    command: cypress run --browser chrome --group Chrome --ci-build-id ${CI_PIPELINE_ID} --record --parallel --key ${CYPRESS_KEY}

Here is a snipper with Percy that does not work.

cypress:
    image: 116147290797.dkr.ecr.eu-west-1.amazonaws.com/squadihp/build-images:cypress-latest
    network_mode: host
    command: npx percy exec --parallel -- cypress run --browser chrome --group Chrome --ci-build-id ${CI_PIPELINE_ID} --record --parallel --key ${CYPRESS_KEY}

The output is:

cypress-1   | You passed the --ci-build-id, --group, --tag, or --parallel flag without also passing the --record flag.
cypress-1   | 
cypress-1   | The --parallel flag you passed was: true
cypress-1   | 
cypress-1   | These flags can only be used when recording to Cypress Cloud.
cypress-1   | 
cypress-1   | https://on.cypress.io/record-params-without-recording
cypress-1 exited with code 1

The image we are using contains:

FROM cypress/included:11.2.0

RUN mkdir /percy && cd /percy && npm install --save-dev @percy/cli

Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions