[x]
):Gitea running in a container docker is displaying in the footer instead of the version (v1.6.0) the hash commit of git (0da8bc9), is this correct?
I am using release v1.6.0 from docker image: gitea/gitea:1.6.0
I have same problem on version 1.6.1
I have just pulled gitea/gitea:1.6
:
REPOSITORY TAG IMAGE ID CREATED SIZE
gitea/gitea 1.6 96b698fc7516 23 hours ago 77.2MB
The web interface is reporting version 200b974
, which is the current HEAD
of branch release/v1.6
, but not the commit of any release as in the original bug report.
The HEAD
commit instead of the last tag is caused by the build step docker
:
docker:
image: plugins/docker:17.12
pull: true
secrets: [ docker_username, docker_password ]
repo: gitea/gitea
tags: [ '${DRONE_BRANCH##release/v}' ]
when:
event: [ push ]
branch: [ release/* ]
The tags
parameter is a replace function that modifies the branch name from release/v1.6
to 1.6
.
This behaviour should be fixed if the event condition is changed from [ push ]
to [ tag ]
. Only tagged commits in the release branches will trigger the deployment then.
I can test this and create a PR in the next few days if desired.
My proposed fix does not work. The tag
event does not have the variable DRONE_BRANCH
populated, only DRONE_TAG
, We would need to drop the last segment of the semver (tag name v1.6.1
-> 1.6
) to know the docker image tag.
Problem is, the Drone string operations do not support regex based replacing, only removing prefix/suffix and substrings.
how can I figure out what version I'm on, is there a file or something internal to the docker image?
I see the hash "8670dec" at the bottom of my UI.
Try checking the release section. But if you used the latest tag this will probably not work
@gcstang you you add that hash to the end of https://github.com/go-gitea/gitea/commit/ then you'll be taken to the exact commit (ex https://github.com/go-gitea/gitea/commit/8670dec
is the URL for the version that you are on)
This issue is still not fixed in gitea docker version 1.6.4. Only the git commit eb0ee6b
is show in the footer.
According to this comment it is also present in the new gitea docker version 1.7.0.
I think this is a duplicate of issue #4782
Duplicate of #4782
Fixed by #6836 and its backport #6839
Most helpful comment
The
HEAD
commit instead of the last tag is caused by the build stepdocker
:The
tags
parameter is a replace function that modifies the branch name fromrelease/v1.6
to1.6
.This behaviour should be fixed if the event condition is changed from
[ push ]
to[ tag ]
. Only tagged commits in the release branches will trigger the deployment then.I can test this and create a PR in the next few days if desired.