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)
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).
some correction here: we can change the naming here, so I went with DASHBOARD_VERSION for the app, we only need to keep the VITE_ prefix for the inner env variable.
There was a problem hiding this comment.
Also changed to VITE_DASHBOARD_VERSION to keep consistent.
322a825 to
c62612f
Compare
|
Can we make this a link to our repo? Maybe a permalink to the specific version, if not dirty |
Linking to the proper version on our repo. |
mentonin
left a comment
There was a problem hiding this comment.
LGTM, just needs to rebase to solve conflicts
1a7fe3a to
9615af3
Compare
Done. |
9615af3 to
11483c3
Compare
* 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>
11483c3 to
107b932
Compare
|
@alanpeixinho I saw that you guys are currently releasing under just a "main" tag, which means that the latest actual tag does not relate to the latest commit, specifically the release/20260513.0 tag. Quoting the Discord bot on his latest messages,
So I'm just thinking if it won't be confusing to have that tag in the dashboard, wouldn't it seem outdated? |
| SSH_HOST: ${{ secrets.STAGING_HOST }} | ||
| SSH_KEY: ${{ secrets.STAGING_KEY }} | ||
|
|
||
| cleanup: |
There was a problem hiding this comment.
Why remove the cleanup step? is the prune unnecessary? Either way I don't understand how this is related to the PR subject
There was a problem hiding this comment.
It was accidental, just a rebase against outdated version. I am updating it now.
We are actually using But we could also always include a tag for prod. What you think? |
Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
That would be great |
I think that ideally the CD that deploys the staging/production would apply the tag automatically (somehow), but I think that it would be good to keep tagging each release as it allows for an easy rollback to "the previous deployment" and would avoid date confusion. Otherwise, my preference would be to use a longer commit hash, but I'm fine with the current layout - having something is better than nothing, I don't want to block this PR for nitpicking. |

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
DASHBOARD_VERSION=$(git describe --tags --always) docker compose build dashboard.Closes #1611