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
Deploy demo of Datasette on every commit that passes tests #313
Comments
The fixtures database created by our unit tests makes for a good "live" demo of Datasette in action. I've improved the metadata it ships with to better support this use-case. I've also improved the mechanism for writing out fixtures: you can do this: python tests/fixtures.py fixtures.db To get just the fixtures database written out... or you can do this: python tests/fixtures.py fixtures.db fixtures.json To get metadata which you can then serve like so: datasette fixtures.db -m fixtures.json Refs #313
This will require some relatively sophisticated Travis build steps. Useful docs: https://docs.travis-ci.com/user/build-stages/ - useful example: https://docs.travis-ci.com/user/build-stages/deploy-heroku/ |
This is a relatively obscure new command-line argument that helps solve the problem of showing accurate version information in deployed instances of Datasette even if they were deployed directly from source code. You can pass --version-note to datasette publish and package and it will then in turn be passed to datasette when it starts: datasette --version-note=hello fixtures.db Now if you visit /-/versions.json you will see this: { "datasette": { "note": "hello", "version": "0+unknown" }, "python": { "full": "3.6.5 (default, Jun 6 2018, 19:19:24) \n[GCC 6.3.0 20170516]", "version": "3.6.5" }, ... } I plan to use this in some Travis CI configuration, refs #313
If the tests pass in Travis CI, deploy an instance containing Datasette's test fixtures to https://latest.datasette.io/ Also set up an alias of truncated-commit-hash.datasette.io
This very nearly works... But... https://f0c1722.datasette.io/-/versions isn't showing the correct note:
There should be a |
It looks like all of my test deploys ended up going to the same Zeit deployment ID: https://zeit.co/simonw/datasette-latest/rbmtcedvlj This is strange... the Dockerfile should be different for each one (due to the differing version-note). |
Partial log of the
So it looks like |
Aha!
That explains it. I need to set the same alias in my call to |
That fixed it! https://958b75c.datasette.io/-/versions
|
We can use Travis CI and Zeit Now to ensure there is always a live demo of current master. We can ship archived demos for releases as well.
The text was updated successfully, but these errors were encountered: