When deploying new versions of my app I can get the Fly.io instance ID via the FLY_ALLOC_ID but there is no way for me to know what version of the app is deploying easily when using continuous deployments via things like GitHub actions.
The fly CLI tool gives me a nice version/release that gets created each time (ie messages like v81 deployed successfully). It would be fantastic if this was supplied to the deployments as well so it can easily be printed via logs or something.
Thanks for fly though! Its absolutely fantastic and a real joy to deploy apps to!
This is tricky for reasons you shouldn’t have to worry about!
Are you just trying to get a sense of what code is running? I know several people set an env variable from a git revision at deploy time. If that’s helpful, you can run something like:
It would be really useful to be able to get the build number or the git revision number. I know I can set an env var for GIT_REVISION myself through the CLI, but it would be great to not have to add this myself as my deploy command is already long enough.
I’m also curious if there’s any movement on the ability to pass env vars in a first-class fashion.
Git commits are frequently used to tie exceptions and performance metrics to specific SHAs, and most PaaS’s support passing them as env vars from CI/CD pipelines.