Skip to content

tag/commit hash is not respected in new image builds #6445

@daall

Description

@daall

Description
Recent 202012 builds from Jenkins are coming out like this:

admin@sonic~$ show ver
SONiC Software Version: SONiC.202012.8-dirty-20210113.013138
Distribution: Debian 10.7
Kernel: 4.19.0-9-2-amd64
Build commit: 063a4859
Build date: Wed Jan 13 08:20:46 UTC 2021
Built by: johnar@jenkins-worker-7

Steps to reproduce the issue:

  1. Build an image based on a specific tag or commit hash, w/o any outstanding/uncommitted changes.
  2. Check the IMAGE_VERSION in the build output
  3. Check show ver on a DUT

Describe the results you received:
Image says "dirty" and has a time stamp like so:

admin@sonic~$ show ver
SONiC Software Version: SONiC.202012.8-dirty-20210113.013138
Distribution: Debian 10.7
Kernel: 4.19.0-9-2-amd64
Build commit: 063a4859
Build date: Wed Jan 13 08:20:46 UTC 2021
Built by: johnar@jenkins-worker-7

Describe the results you expected:
Image version should just have the tag/commit hash that it was built off of, since there are no outstanding changes when we build on Jenkins.

admin@sonic~$ show ver
SONiC Software Version: 202012.7-264ecb18
Distribution: Debian 10.7
Kernel: 4.19.0-9-2-amd64
Build commit: 063a4859
Build date: Wed Jan 13 08:20:46 UTC 2021
Built by: johnar@jenkins-worker-7

Additional information you deem important (e.g. issue happens only occasionally):
If you look at the output in the build logs, it looks like the initial container/buster container has the correct image version, but subsequent ones do not.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions