Skip to content

chore: delete e2e deploys in afterAll #2004

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

Merged
merged 14 commits into from
Apr 6, 2023
Merged

chore: delete e2e deploys in afterAll #2004

merged 14 commits into from
Apr 6, 2023

Conversation

LekoArts
Copy link

@LekoArts LekoArts commented Mar 22, 2023

Summary

For our e2e tests we already run an afterAll call for every test. There we call .destroy().

I've extended the NextDeployInstance class to override the base destroy() method. It now deletes the deploy that the class
created in the setup() method.

It does this by calling the netlify api with deleteDeploy

Test plan

  1. See if tests that should pass still pass
  2. Check if deploys are actually deleted

Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal

Fixes https://github.com/netlify/pod-ecosystem-frameworks/issues/423

@github-actions github-actions bot added the type: chore work needed to keep the product and development running smoothly label Mar 22, 2023
@netlify
Copy link

netlify bot commented Mar 22, 2023

Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!

Name Link
🔨 Latest commit c95f408
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/642e7b822036c700082556c0
😎 Deploy Preview https://deploy-preview-2004--netlify-plugin-nextjs-nx-monorepo-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 22, 2023

Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!

Name Link
🔨 Latest commit c95f408
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/642e7b82b8763500074d7f50
😎 Deploy Preview https://deploy-preview-2004--netlify-plugin-nextjs-static-root-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 22, 2023

Deploy Preview for netlify-plugin-nextjs-export-demo ready!

Name Link
🔨 Latest commit c95f408
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/642e7b829c3d5c0008cde6d7
😎 Deploy Preview https://deploy-preview-2004--netlify-plugin-nextjs-export-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 22, 2023

Deploy Preview for next-plugin-edge-middleware ready!

Name Link
🔨 Latest commit c95f408
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/642e7b8233010300087ae9d0
😎 Deploy Preview https://deploy-preview-2004--next-plugin-edge-middleware.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 22, 2023

Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!

Name Link
🔨 Latest commit c95f408
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/642e7b82d1a7fa000882140f
😎 Deploy Preview https://deploy-preview-2004--netlify-plugin-nextjs-next-auth-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 22, 2023

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit c95f408
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/642e7b822036c700082556c5
😎 Deploy Preview https://deploy-preview-2004--next-i18next-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 22, 2023

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit c95f408
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/642e7b82b8763500074d7f55
😎 Deploy Preview https://deploy-preview-2004--next-plugin-canary.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 22, 2023

Deploy Preview for nextjs-plugin-custom-routes-demo ready!

Name Link
🔨 Latest commit c95f408
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/642e7b823c03ef00080bab1d
😎 Deploy Preview https://deploy-preview-2004--nextjs-plugin-custom-routes-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 22, 2023

Deploy Preview for netlify-plugin-nextjs-demo ready!

Name Link
🔨 Latest commit c95f408
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/642e7b828597c40008dc1b3e
😎 Deploy Preview https://deploy-preview-2004--netlify-plugin-nextjs-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@LekoArts LekoArts marked this pull request as ready for review April 5, 2023 14:07
@LekoArts LekoArts requested a review from a team April 5, 2023 14:07
Copy link

@sarahetter sarahetter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Left some comments and suggestions.

console.log(`Deploys site for test: ${testName}`)

this._netlifySiteId = process.env.NETLIFY_SITE_ID || '1d5a5c76-d445-4ae5-b694-b0d3f2e2c395'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the default site ID '1d5a5c76-d445-4ae5-b694-b0d3f2e2c395'?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who knows... 😆 That code was already there, I only moved it

Copy link

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @LekoArts! 🚢

@LekoArts LekoArts merged commit 019b6b1 into main Apr 6, 2023
@LekoArts LekoArts deleted the delete-e2e-deploys branch April 6, 2023 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants