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
How does plugin get deployed url in postDeploy hook? #270
Comments
Hi @bahmutov, At the moment, we are using the @DavidWells Could you confirm I got this right? I actually think we should expose this to plugin methods as |
So the user would manually set
|
I think the I might be wrong though: @DavidWells is this correct? |
I did not see |
I have tried using
but for example for this run https://app.netlify.com/sites/condescending-knuth-7cff53/deploys/5da0af7510b65eacdab96a44 the passed first url is 404
|
@bahmutov that code is correct. The issue right now is the deployment is actually happening outside of the lifecycle and the real site is not yet live when your code is called. We are working on resolving this. For the time being, the cypress tests would need to run against the locally build files in the |
how does one access `build.publish` folder? Also, the plugin would need to
serve the pages (statically) by itself before testing, right?
…On Fri, Oct 11, 2019 at 12:43 PM David Wells ***@***.***> wrote:
@bahmutov <https://github.com/bahmutov> that code is correct.
The issue right now is the deployment is actually happening outside of the
lifecycle and the real site is not yet live when your code is called.
We are working on resolving this.
For the time being, the cypress tests would need to run against the
locally build files in the build.publish directory
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#270?email_source=notifications&email_token=AAQ4BJU5W46Z5DEMXD6CS5TQOCUL3A5CNFSM4I7ZPZQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBAR4YI#issuecomment-541138529>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ4BJV5JLL3OJMFHW4SCY3QOCUL3ANCNFSM4I7ZPZQQ>
.
--
Dr. Gleb Bahmutov, PhD
Schedule video chat / phone call / meeting with me via
https://calendly.com/bahmutov
gleb.bahmutov@gmail.com @bahmutov <https://twitter.com/@bahmutov>
https://glebbahmutov.com/ https://glebbahmutov.com/blog
https://github.com/bahmutov
|
Yeah the site would need to get served with something like https://www.npmjs.com/package/serve You can get the build directory like so: module.exports = function netlifyPlugin(pluginConfig) {
return {
postBuild: ({ config }) => {
console.log(config.build.publish)
},
}
} We are working on getting this sorted out so you can run against live URLs without the need to serve locally |
super, will change the plugin so it could test both postBuild and postDeploy
…On Fri, Oct 11, 2019 at 12:53 PM David Wells ***@***.***> wrote:
Yeah the site would need to get served with something like
https://www.npmjs.com/package/serve
You can get the build directory like so:
module.exports = function netlifyPlugin(pluginConfig) {
return {
postBuild: ({ config }) => {
console.log(config.build.publish)
},
}
}
We are working on getting this sorted out so you can run against live URLs
without the need to serve locally
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#270?email_source=notifications&email_token=AAQ4BJQ2X2ZMIOQGDEDEH5DQOCVRBA5CNFSM4I7ZPZQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBASXGY#issuecomment-541141915>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ4BJTQ5KIVBSOOXLF5WQDQOCVRBANCNFSM4I7ZPZQQ>
.
--
Dr. Gleb Bahmutov, PhD
Schedule video chat / phone call / meeting with me via
https://calendly.com/bahmutov
gleb.bahmutov@gmail.com @bahmutov <https://twitter.com/@bahmutov>
https://glebbahmutov.com/ https://glebbahmutov.com/blog
https://github.com/bahmutov
|
Whats the status on this? |
We have a pending PR at #513 to add the base support for this. Once this is merged, we will need to do some additional work in this repository to make this work. Stay tuned! :) |
Any update here? Getting the site URL would unlock some interesting workflows. |
@mwickett We are still on the design phase for this feature. It turns out it requires some rather big infrastructure changes so we are evaluating the best way to approach this. |
I would be interested in opting in as a beta tester if it's possible for this feature :) |
This issue has been automatically marked as stale because it has not had activity in 1 year. It will be closed in 14 days if no further activity occurs. Thanks! |
This issue was closed because it had no activity for over 1 year. |
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Imagine you are writing a
postDeploy
hook - like Lighthouse or Cypress need to test the deployed site. How would the plugin get the deployed unique url to test?The text was updated successfully, but these errors were encountered: