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

Allow config using DEPLOY_URL instead of DEPLOY_PRIME_URL #350

Closed
wants to merge 2 commits into from

Conversation

gregprodind
Copy link

@gregprodind gregprodind commented Jun 13, 2023

Based on the work from Truebill:stevehollaar/deploy-url in #297.

This PR adds a new deployUrlEnvVar plugin input, which defaults to DEPLOY_PRIME_URL but should allow overriding with DEPLOY_URL.

Based on the work from Truebill:stevehollaar/deploy-url

Added comments from PR preview
Default to DEPLOY_PRIME_URL if not set or invalid environment variable setting.
@netlify
Copy link

netlify bot commented Jun 13, 2023

👷 Deploy request for netlify-plugin-cypress pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 55c436d

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@cypress-app-bot
Copy link

@gregprodind gregprodind changed the title Allow confuring using DEPLOY_URL instead of DEPLOY_PRIME_URL Allow config using DEPLOY_URL instead of DEPLOY_PRIME_URL Jun 13, 2023
manifest.yml Outdated Show resolved Hide resolved
src/onSuccess.js Outdated Show resolved Hide resolved
@MikeMcC399
Copy link
Contributor

@mschile
Copy link

mschile commented Jun 13, 2023

@gregprodind, have you been able to verify if these changes work with the DEPLOY_URL? I tried to test the changes but the DEPLOY_URL appears to be incorrect. I'm not a netlify expert by any means so I could have something configured incorrectly but we'll need some sort of verification these changes work before we can merge the PR.

@gregprodind
Copy link
Author

@mschile I have just updated my project to use my branch and used the new parameter and set it as follows:
deployUrlEnvVar = "DEPLOY_URL"

I kicked a deploy on netlify and I can see it runs against the deployed URL:
11:19:25 AM: netlify-plugin-cypress (onSuccess event)
11:19:25 AM: ────────────────────────────────────────────────────────────────
11:19:25 AM: ​
11:19:25 AM: testing deployed url https://648985b207644300087be0...[redacted]

Looks ok from my end. What are the issues you observed?

@mschile
Copy link

mschile commented Jun 14, 2023

@gregprodind, when I was running my test, the DEPLOY_URL was https://0--netlify-plugin-cypress.netlify.app which is not valid. But I may not have my test app configured correctly.

Could you also run setting the DEBUG env variable to:
DEBUG=netlify-plugin-cypress

@gregprodind
Copy link
Author

here is the log with debug turned on:
8:32:27 AM: (netlify-plugin-cache onSuccess completed in 5ms)
8:32:27 AM: ​
8:32:27 AM: netlify-plugin-cypress (onSuccess event)
8:32:27 AM: ────────────────────────────────────────────────────────────────
8:32:27 AM: ​
8:32:27 AM: 2023-06-15T06:32:27.702Z netlify-plugin-cypress onSuccess inputs { enable: true, browser: 'chromium', record: true, deployUrlEnvVar: 'DEPLOY_URL' }
8:32:27 AM: 2023-06-15T06:32:27.702Z netlify-plugin-cypress onSuccess against { siteName: '[redacted]', deployUrl: 'https://648aaffb5d4acf000[redacted].netlify.app/', isLocal: false }
8:32:27 AM: 2023-06-15T06:32:27.702Z netlify-plugin-cypress onSuccessInputs object { enable: true, browser: 'chromium', record: true, deployUrlEnvVar: 'DEPLOY_URL' }
8:32:27 AM: 2023-06-15T06:32:27.702Z netlify-plugin-cypress deployed url test parameters { hasRecordKey: true, record: true, spec: undefined, group: 'onSuccess', tag: 'production' }
8:32:27 AM: testing deployed url https://648aaffb5d4acf000[redacted].netlify.app/
8:32:27 AM: 2023-06-15T06:32:27.877Z netlify-plugin-cypress local Chromium revisions [ '1045629' ]
8:32:27 AM: 2023-06-15T06:32:27.879Z netlify-plugin-cypress found Chromium { revision: '1045629', executablePath: '/opt/build/repo/node_modules/netlify-plugin-cypress/node_modules/puppeteer/.local-chromium/linux-1045629/chrome-linux/chrome', folderPath: '/opt/build/repo/node_modules/netlify-plugin-cypress/node_modules/puppeteer/.local-chromium/linux-1045629', local: true, url: 'https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1045629/chrome-linux.zip', product: 'chrome' }
8:32:27 AM: 2023-06-15T06:32:27.880Z netlify-plugin-cypress run cypress params { baseUrl: 'https://648aaffb5d4acf000[redacted].netlify.app/', record: true, spec: undefined, group: 'onSuccess', tag: 'production', ciBuildId: '648aaffb5d4acf0008ef6f08', browser: '/opt/build/repo/node_modules/netlify-plugin-cypress/node_modules/puppeteer/.local-chromium/linux-1045629/chrome-linux/chrome' }
8:32:28 AM: [5056:0615/063228.139117:ERROR:node_bindings.cc(279)] Most NODE_OPTIONs are not supported in packaged apps. See documentation for more details.
8:32:28 AM: DevTools listening on ws://127.0.0.1:34147/devtools/browser/324c861b-0d3e-458c-8938-19bdc3e1ccea
8:32:28 AM: [5209:0615/063228.528262:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
8:32:30 AM: Couldn't find tsconfig.json. tsconfig-paths will be skipped
8:32:30 AM: ====================================================================================================
8:32:30 AM: (Run Starting)
8:32:30 AM: ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
8:32:30 AM: │ Cypress: 12.13.0 │
8:32:30 AM: │ Browser: Custom Chromium 107 (headless) │
8:32:30 AM: │ Node Version: v16.13.2 (/opt/buildhome/.nvm/versions/node/v16.13.2/bin/node) │
8:32:30 AM: │ Specs: 1 found (basic.cy.js) │
8:32:30 AM: │ Searched: cypress/e2e/**/*.cy.{js,jsx,ts,tsx} │
8:32:30 AM: │ Params: Tag: production, Group: onSuccess, Parallel: false │
8:32:30 AM: │ Run URL: https://cloud.cypress.io/projects/[redacted]
8:32:30 AM: └────────────────────────────────────────────────────────────────────────────────────────────────┘
8:32:30 AM: ────────────────────────────────────────────────────────────────────────────────────────────────────
8:32:30 AM: Running: basic.cy.js (1 of 1)
8:32:30 AM: Estimated: 12 seconds
8:32:32 AM:
8:32:32 AM: Demo site
8:32:45 AM: ✓ loads (12561ms)
8:32:45 AM: 1 passing (13s)
8:32:46 AM: (Results)
8:32:46 AM: ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
8:32:46 AM: │ Tests: 1 │
8:32:46 AM: │ Passing: 1 │
8:32:46 AM: │ Failing: 0 │
8:32:46 AM: │ Pending: 0 │
8:32:46 AM: │ Skipped: 0 │
8:32:46 AM: │ Screenshots: 0 │
8:32:46 AM: │ Video: true │
8:32:46 AM: │ Duration: 12 seconds │
8:32:46 AM: │ Estimated: 12 seconds │
8:32:46 AM: │ Spec Ran: basic.cy.js │
8:32:46 AM: └────────────────────────────────────────────────────────────────────────────────────────────────┘
8:32:46 AM: (Video)
8:32:46 AM: - Started compressing: Compressing to 32 CRF
8:32:47 AM: - Finished compressing: 1 second
8:32:47 AM: - Video output: /opt/build/repo/cypress/videos/basic.cy.js.mp4
8:32:47 AM: (Uploading Screenshots & Videos)
8:32:48 AM: - Done Uploading (1/1) /opt/build/repo/cypress/videos/basic.cy.js.mp4
8:32:48 AM: ====================================================================================================
8:32:48 AM: (Run Finished)
8:32:48 AM: Spec Tests Passing Failing Pending Skipped
8:32:48 AM: ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
8:32:48 AM: │ ✔ basic.cy.js 00:12 1 1 - - - │
8:32:48 AM: └────────────────────────────────────────────────────────────────────────────────────────────────┘
8:32:48 AM: ✔ All specs passed! 00:12 1 1 - - -
8:32:48 AM: ───────────────────────────────────────────────────────────────────────────────────────────────────────
8:32:48 AM: Recorded Run: https://cloud.cypress.io/projects/[redacted]/runs/8
8:32:48 AM: 2023-06-15T06:32:48.598Z netlify-plugin-cypress Cypress run results
8:32:48 AM: 2023-06-15T06:32:48.599Z netlify-plugin-cypress totalDuration: 12592
8:32:48 AM: 2023-06-15T06:32:48.599Z netlify-plugin-cypress totalSuites: 1
8:32:48 AM: 2023-06-15T06:32:48.599Z netlify-plugin-cypress totalTests: 1
8:32:48 AM: 2023-06-15T06:32:48.599Z netlify-plugin-cypress totalPassed: 1
8:32:48 AM: 2023-06-15T06:32:48.599Z netlify-plugin-cypress totalPending: 0
8:32:48 AM: 2023-06-15T06:32:48.599Z netlify-plugin-cypress totalFailed: 0
8:32:48 AM: 2023-06-15T06:32:48.599Z netlify-plugin-cypress totalSkipped: 0
8:32:48 AM: ​

@mschile mschile assigned cacieprins and unassigned mschile Jun 23, 2023
@jennifer-shehane
Copy link
Member

@gregprodind Could you please sign our CLA? We won't be able to merge anything when this isn't signed.

@jennifer-shehane
Copy link
Member

Closing due to inactivity

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

8 participants