Implicitly inject build version into app environment

Open
#577 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, go
Domain
cli

Research direction

Start at the fly deploy command and trace how deployment environment variables are assembled, including the existing git-SHA behavior mentioned in the issue. Done means fly deploy supplies FLY_BUILD_SHA from the Docker image SHA by default while allowing an explicit override; add coverage for both default and override behavior.

Written by the indexing model from the issue text.

Description

enhancement good small task

People ask how to detect what version of their code is running all the time. We have a way to do this with git sha, but I'd like to implicitly handle it with fly deploy. A default -e on fly deploy would be helpful:

fly deploy  # defaults: -e FLY_BUILD_SHA=<docker image sha>

This seems better than git sha to me since one git commit can be used for lots of image builds. And I'm totally fine with people overriding this for their own purposes.

Dominant language
Go
Stars
1.7k
Forks
311
Avg merge
12h 50m
Merged PRs (30d)
78

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from superfly/flyctl

All issues in superfly/flyctl

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.