@@ -14,8 +14,8 @@ class ImagesHelper {
1414
1515 extractFieldsForImageEntity ( image , tag ) {
1616 const newImage = {
17- name : image . imageDisplayName ,
18- size : filesize ( image . size ) ,
17+ name : image . imageDisplayName || image . imageName ,
18+ size : image . size && filesize ( image . size ) ,
1919 sha : image . sha ,
2020 annotations : _ . get ( image , 'metadata' , { } ) ,
2121 tagId : tag . _id ,
@@ -33,30 +33,24 @@ class ImagesHelper {
3333 }
3434
3535
36- extractImages ( images , filterRegistries ) {
36+ extractImages ( images ) {
3737 if ( ! _ . isArray ( images ) ) {
3838 images = [ images ] ; // eslint-disable-line no-param-reassign
3939 }
4040 return _ . chain ( images )
4141 . map ( ( image ) => {
4242 const res = [ ] ;
43- let addedCfCrTag = false ;
43+ let volumeImage = false ;
4444 _ . forEach ( image . tags , ( tag ) => {
4545 if ( _ . isEqual ( tag . tag , 'volume' ) ) {
46- addedCfCrTag = true ;
46+ volumeImage = true ;
4747 return ;
4848 }
49- // in case we are filtering by registries, ignore the image if it is not from the registires list
50- if ( filterRegistries && ! _ . includes ( filterRegistries , tag . registry ) ) {
51- return ;
52- }
53- if ( _ . includes ( DEFAULTS . CODEFRESH_REGISTRIES , tag . registry ) ) {
54- addedCfCrTag = true ;
55- }
49+
5650 const data = this . extractFieldsForImageEntity ( image , tag ) ;
5751 res . push ( new Image ( data ) ) ;
5852 } ) ;
59- if ( _ . isEmpty ( image . tags ) || ! addedCfCrTag ) {
53+ if ( _ . isEmpty ( image . tags ) && ! volumeImage ) {
6054 const data = this . extractFieldsForImageEntity ( image , NONE_TAG ) ;
6155 res . push ( new Image ( data ) ) ;
6256 }
0 commit comments