-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dockers] Tag all docker images with a version number #5938
[dockers] Tag all docker images with a version number #5938
Conversation
Previously all docker images built into SONiC binary were tagged with SONiC version string. With the introduction of container upgrades and SONiC extension framework all docker images should have their own version numbers that do not relate with SONiC version. All dockers are tagged with version 1.0.0 in this PR. Whenever changes are introduced to a docker image that require a version change, the docker image maintainer should update the version number. Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
5601e96
to
a624e0c
Compare
…rs_version_tags Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@renukamanavalan Sonic package versioning has been extensively discussed on subgroup meetings and was agreed, do you have other comments on this PR or can we proceed? |
@bandaru-viswanath Could you please take a look as well? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which PR has the code for labelling dockers with its version and versions of other common modules it used?
Ans: PR #5939
[Saw that after raising the comments]
@@ -906,7 +906,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ | |||
export enable_pfcwd_on_start="$(ENABLE_PFCWD_ON_START)" | |||
export installer_debs="$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$($*_INSTALLS))" | |||
export lazy_installer_debs="$(foreach deb, $($*_LAZY_INSTALLS),$(foreach device, $($(deb)_PLATFORM),$(addprefix $(device)@, $(IMAGE_DISTRO_DEBS_PATH)/$(deb))))" | |||
export installer_images="$(addprefix $(TARGET_PATH)/,$($*_DOCKERS))" | |||
export installer_images="$(foreach docker, $($*_DOCKERS),$(addprefix $(TARGET_PATH)/,$(addsuffix :$($(docker)_VERSION),$(docker))))" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this, when version is already added to docker image as label ?
This is already part of #5939, thus closing |
Signed-off-by: Stepan Blyschak stepanb@nvidia.com This PR is part of SONiC Application Extension Depends on #5938 - Why I did it To provide an infrastructure change in order to support SONiC Application Extension feature. - How I did it Label every installable SONiC Docker with a minimal required manifest and auto-generate packages.json file based on installed SONiC images. - How to verify it Build an image, execute the following command: admin@sonic:~$ docker inspect docker-snmp:1.0.0 | jq '.[0].Config.Labels["com.azure.sonic.manifest"]' -r | jq Cat /var/lib/sonic-package-manager/packages.json file to verify all dockers are listed there.
Signed-off-by: Stepan Blyschak stepanb@nvidia.com This PR is part of SONiC Application Extension Depends on sonic-net#5938 - Why I did it To provide an infrastructure change in order to support SONiC Application Extension feature. - How I did it Label every installable SONiC Docker with a minimal required manifest and auto-generate packages.json file based on installed SONiC images. - How to verify it Build an image, execute the following command: admin@sonic:~$ docker inspect docker-snmp:1.0.0 | jq '.[0].Config.Labels["com.azure.sonic.manifest"]' -r | jq Cat /var/lib/sonic-package-manager/packages.json file to verify all dockers are listed there.
Signed-off-by: Stepan Blyschak stepanb@nvidia.com This PR is part of SONiC Application Extension Depends on sonic-net#5938 - Why I did it To provide an infrastructure change in order to support SONiC Application Extension feature. - How I did it Label every installable SONiC Docker with a minimal required manifest and auto-generate packages.json file based on installed SONiC images. - How to verify it Build an image, execute the following command: admin@sonic:~$ docker inspect docker-snmp:1.0.0 | jq '.[0].Config.Labels["com.azure.sonic.manifest"]' -r | jq Cat /var/lib/sonic-package-manager/packages.json file to verify all dockers are listed there.
Previously all docker images built into SONiC binary were tagged with SONiC version string. With the introduction of container upgrades and SONiC extension framework all docker images should have their own version numbers that do not relate with SONiC version.
All dockers are tagged with version 1.0.0 in this PR. Whenever changes are introduced to a docker image that require a version change, the docker image maintainer should update the version number.
Signed-off-by: Stepan Blyschak stepanb@nvidia.com
This PR is part of SONiC Application Extension
- Why I did it
SONiC Docker have to follow semantic versioning spec. Thus, Docker images have to be tagged with a semantic version string.
- How I did it
For each Docker image defined version variable. This variable is passed to sonic_debian_extension.sh script which loads and tags images.
- How to verify it
Build an image and do "show version", all Docker images now are tagged with string "1.0.0".
- Which release branch to backport (provide reason below if selected)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)