Version naming/branding for in-house builds

Skip to first unread message

Christian Svensson

Jan 6, 2022, 5:12:37 AM1/6/22
to sonicproject

An organization I am part of has a fork of sonic-buildimage that we use for in-house builds that include patches that have not been accepted upstream yet.
We follow the same branch naming as Azure/sonic-buildimage (e.g. 202111) and we also use the same Azure Pipelines[1] scripts to run our builds.

The issue we face is that this results in images with version information extremely similar to official upstream images.
Example: 202012.19-08de2b148 is our build version, while the latest upstream is 202012.63280-1eec2bc25.
The for an operator that is more confusing than it needs to be.

We would like to be able to set an environment variable to "brand" or tag a version as a certain organization.
My current hack is this[2] which changes the format to ${branch_name}-${BUILD_ORG}.${BUILD_NUMBER}-${commit} but
I would be happy with any format that the community accepts. My biggest concern about making something like this up for
myself is to break potential version string parsing that may happen now or in the future.




Jan 6, 2022, 8:32:32 AM1/6/22
to sonicproject
will overriding the $SONIC_IMAGE_VERSION during the make suffice your requirement ?

Christian Svensson

Jan 6, 2022, 9:00:12 AM1/6/22
to Yuval-Mellanox, sonicproject

Thanks for the suggestion!
In theory yes that would work - but In that case I would have to introduce an extra script step in the CI build that basically does what sonic_get_version does in order to calculate what to set that variable to.
Seems like a lot of extra work, it's easier to carry a patch to modify in that case.

You received this message because you are subscribed to the Google Groups "sonicproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages