feat/vcs info#1998
Conversation
| file: ./dashboard/Dockerfile | ||
| push: true | ||
| build-args: | | ||
| VITE_APP_VERSION=${{ steps.version.outputs.value }} |
There was a problem hiding this comment.
just a nit: your commit message says VITE_VERSION but actually is VITE_APP_VERSION
|
|
||
| - name: Compute app version | ||
| id: version | ||
| run: echo "value=$(git describe --tags --always)" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
Can we use a descriptive name here?
There was a problem hiding this comment.
Absolutelly. Do you have any suggestion?
There was a problem hiding this comment.
Do you have any suggestion?
version or repo_version or app_version or APP_VERSION (or equivalent if you decide to change APP_VERSION)
| context: . | ||
| dockerfile: ./dashboard/Dockerfile | ||
| args: | ||
| VITE_APP_VERSION: ${APP_VERSION:-} |
There was a problem hiding this comment.
Why mix APP_VERSION and VITE_APP_VERSION?
There was a problem hiding this comment.
The VITE_ prefix is required by VITE.
But, on our own variables, I would rather keep them agnostic (if we ever change vite).
There was a problem hiding this comment.
In that case, I would prefer FRONTEND_VERSION or DASHBOARD_VERSION
There was a problem hiding this comment.
Also, use APP_VERSION as the container ARG/ENV, and set VITE_APP_VERSION inside the container, so we only interact with "our" variable when building (e.g. on the deploy-containers workflow)
* Include a VITE_APP_VERSION derived from git describe.
* Include frontend sidebar information showing VITE_VERSION.
Closes kernelci#1611
Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
322a825 to
c62612f
Compare
|
Can we make this a link to our repo? Maybe a permalink to the specific version, if not dirty |

What it is
Shows the deployed version (
git describe --tags --always, uses tag if present, otherwise uses short commit) at the bottom of the sidebar, so we can tell which build is running even when drift is backend-only.How to test
Dev
pnpm devgit describe --tags --always --dirty.Docker
APP_VERSION=$(git describe --tags --always) docker compose build dashboard.Closes #1611