Hello, trying to run Cypress through Jenkins throws me an error:
Installing Cypress (version: 3.1.0)
[?25l[17:45:21] Downloading Cypress [started]
[17:45:23] Downloading Cypress [completed]
[17:45:23] Unzipping Cypress [started]
[17:45:23] Unzipping Cypress [failed]
[?25hThe Cypress App could not be unzipped.
Search for an existing issue or open a GitHub issue at
https://github.com/cypress-io/cypress/issues
----------
Error: Target directory is expected to be absolute
----------
Platform: linux (Debian - 8.11)
Cypress Version: 3.1.0
[?25hnpm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node index.js --exec install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Resolved this one myself, you have to specify absolute path to directory on workspace where cypress is unzipped - HOME="${env.WORKSPACE}"
Hi, please, can you help me?; how can i specific the absolute path?. Thanks
@jsonhp
pipeline {
. . .
stages {
stage('build and test') {
environment {
CYPRESS_RECORD_KEY = credentials('cypress-example-kitchensink-record-key')
**HOME="${env.WORKSPACE}"**
}
. . .
Most helpful comment
Resolved this one myself, you have to specify absolute path to directory on workspace where cypress is unzipped - HOME="${env.WORKSPACE}"