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

Issue while installing cypress binary in Jenkins run #28151

Closed
vivekchaks opened this issue Oct 26, 2023 · 2 comments
Closed

Issue while installing cypress binary in Jenkins run #28151

vivekchaks opened this issue Oct 26, 2023 · 2 comments
Labels
stale no activity on this issue for a long period topic: installation Issue during installation or downloading Cypress

Comments

@vivekchaks
Copy link

vivekchaks commented Oct 26, 2023

Current behavior

Hi Team,

I'm trying to install cypress during the rum time in Jenkins run using below shell commands but getting error
stages {
stage('Install dependencies') {
steps {
script {
sh ''' set -x
wget https://dependencies.openet.com/artifactory/nodejs-releases-remote/latest-v16.x/node-v16.20.2-linux-x64.tar.gz
tar xvf node-v16.20.2-linux-x64.tar.gz
'''

                env.PATH = "/opt/openet/git/bin:/usr/local/bin:/usr/bin:/opt/maven/apache-maven-3.3.3/bin:${WORKSPACE}/node-v16.20.2-linux-x64/bin"

                sh ''' set -x
                    echo $PATH
                    node -v
                    npm config set strict-ssl false
                    npm config set registry https://dummy.com/artifactory/api/npm/npm/
                    export HTTP_PROXY=http://dummy.com:8080
                    export http_proxy=${HTTP_PROXY}
                    export HTTPS_PROXY=${HTTP_PROXY}
                    export https_proxy=${HTTP_PROXY}
                    export NO_PROXY=fs.dummy.com,*.corp.dummy.com,localhost,127.0.0.1,.internal,.dummy.com
                    export no_proxy=${NO_PROXY}
                    echo $https_proxy
                    **CYPRESS_CACHE_FOLDER= ~/.cache/Cypress npm install --prefix /home/centos/workspace/CF5G-14616-staticPCCrulecreation/pcf-gui-automation/configuration/src/test/cypress cypress --save-dev**
                    npm i -D @mmisty/cypress-allure-adapter --save-dev
                '''
            }
        }
    }

In Jenkins run when it is trying run the highlighted command for installing cypress it is throwing below error
20:52:11 /home/centos/workspace/CF5G-14616-staticPCCrulecreation@tmp/durable-e266d6c7/script.sh: line 13: /home/centos/.cache/Cypress: No such file or directory

Can someone please suggest how to install cypress during Jenkins run at build time

Even i tried option of adding command
npm install --prefix ./pcf-gui-automation/configuration/src/test/cypress cypress --save-dev
npm cache add ./pcf-gui-automation/configuration/src/test/cypress/node_modules/cypress

to install cypress but getting error saying

15:38:26 + npm cache add /home/centos/.cache/Cypress
15:38:26 npm WARN tarball tarball data for file:/home/centos/.cache/Cypress (null) seems to be corrupted. Trying again.
15:38:26 npm WARN tarball tarball data for file:/home/centos/.cache/Cypress (null) seems to be corrupted. Trying again.
15:38:26 npm ERR! code ENOENT
15:38:26 npm ERR! syscall open
15:38:26 npm ERR! path /home/centos/.cache/Cypress/package.json
15:38:26 npm ERR! errno -2
15:38:26 npm ERR! enoent ENOENT: no such file or directory, open '/home/centos/.cache/Cypress/package.json'
15:38:26 npm ERR! enoent This is related to npm not being able to find a file.
15:38:26 npm ERR! enoent

Debug logs

No response

Cypress Version

13.3.3

Node version

16.20.2

Package Manager

npm

Package Manager Version

8.x

Operating system

Linux

Operating System Version

Centos 7

Other

No response

@vivekchaks vivekchaks added the topic: installation Issue during installation or downloading Cypress label Oct 26, 2023
@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label Apr 25, 2024
@cypress-app-bot
Copy link
Collaborator

This issue has been closed due to inactivity.

@cypress-app-bot cypress-app-bot closed this as not planned Won't fix, can't repro, duplicate, stale May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale no activity on this issue for a long period topic: installation Issue during installation or downloading Cypress
Projects
None yet
Development

No branches or pull requests

2 participants