@@ -67,6 +67,7 @@ type Release struct {
6767 SriovCni * ReleaseImageSpec
6868 SriovIbCni * ReleaseImageSpec
6969 Mofed * ReleaseImageSpec
70+ MofedStig * ReleaseImageSpec
7071 RdmaSharedDevicePlugin * ReleaseImageSpec
7172 SriovDevicePlugin * ReleaseImageSpec
7273 IbKubernetes * ReleaseImageSpec
@@ -185,19 +186,31 @@ func docaDriverTagsCheck(release *Release, docaDriverMatrix *string) {
185186 fmt .Printf ("Error: %v\n " , err )
186187 os .Exit (1 )
187188 }
188- if err := validateTags (config , tags , release .Mofed .Version ); err != nil {
189+ tagsStig , err := listTags (release .MofedStig .Repository , release .MofedStig .Image )
190+ if err != nil {
191+ fmt .Printf ("Error: %v\n " , err )
192+ os .Exit (1 )
193+ }
194+ if err := validateTags (config , tags , release .Mofed .Version , func (os string ) bool {return ! strings .HasSuffix (os , "-stig" )}); err != nil {
195+ fmt .Printf ("Error: %v\n " , err )
196+ os .Exit (1 )
197+ }
198+ if err := validateTags (config , tagsStig , release .MofedStig .Version , func (os string ) bool {return strings .HasSuffix (os , "-stig" )}); err != nil {
189199 fmt .Printf ("Error: %v\n " , err )
190200 os .Exit (1 )
191201 }
192202}
193203
194- func validateTags (config DocaDriverMatrix , tags []string , version string ) error {
204+ func validateTags (config DocaDriverMatrix , tags []string , version string , shouldValidateOsFunction func ( string ) bool ) error {
195205 // Build expected OS-arch combinations
196206 expectedCombinations := make (map [string ]struct {})
197207 for _ , entry := range config .DynamicallyCompiled {
198208 for _ , arch := range entry .Arches {
199- key := fmt .Sprintf ("%s-%s" , entry .OS , arch )
200- expectedCombinations [key ] = struct {}{}
209+ shouldValidateCurrentEntry := shouldValidateOsFunction (entry .OS )
210+ if shouldValidateCurrentEntry {
211+ key := fmt .Sprintf ("%s-%s" , entry .OS , arch )
212+ expectedCombinations [key ] = struct {}{}
213+ }
201214 }
202215 }
203216
0 commit comments