File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
backend/src/main/java/io/reliza/service Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -882,7 +882,21 @@ public List<Component> parseCustomReleaseDataIntoCycloneDxComponents(ReleaseData
882882 }
883883 }
884884
885- c .setVersion (version );
885+ // For container components, use Docker-safe version to ensure compatibility with Docker/OCI tag constraints
886+ // For all other types, keep semantic version as-is
887+ String componentVersion = version ;
888+ if (cycloneComponentType == Component .Type .CONTAINER ) {
889+ if (StringUtils .isNotEmpty (version )) {
890+ componentVersion = Utils .dockerTagSafeVersion (version );
891+ } else {
892+ // Container artifacts should always have a version
893+ // If missing, log warning and use 'latest' as fallback
894+ log .warn ("Container artifact '{}' missing version, using 'latest' as fallback" , dd .getDisplayIdentifier ());
895+ componentVersion = "latest" ;
896+ }
897+ }
898+
899+ c .setVersion (componentVersion );
886900
887901 if (null != rd .properties () && !rd .properties ().isEmpty ()) {
888902 List <Property > addProps = rd .properties ().entrySet ()
You can’t perform that action at this time.
0 commit comments