@@ -169,7 +169,6 @@ func newHashreleaseOperator(dir, version, imageName, registry string, arches []s
169169}
170170
171171func buildHashreleaseOperator (dir , version , imageName , registry string , arches []string ) error {
172- initImageName := fmt .Sprintf ("%s-init" , imageName )
173172 env := os .Environ ()
174173 env = append (env , fmt .Sprintf ("ARCHES=%s" , strings .Join (arches , " " )))
175174 env = append (env , fmt .Sprintf ("GIT_VERSION=%s" , version ))
@@ -190,27 +189,6 @@ func buildHashreleaseOperator(dir, version, imageName, registry string, arches [
190189 }
191190 logrus .WithField ("tag" , tag ).Debug ("Built image" )
192191 }
193-
194- env = os .Environ ()
195- env = append (env , fmt .Sprintf ("ARCHES=%s" , strings .Join (arches , " " )))
196- env = append (env , fmt .Sprintf ("GIT_VERSION=%s" , version ))
197- env = append (env , fmt .Sprintf ("BUILD_IMAGE=%s" , imageName ))
198- env = append (env , fmt .Sprintf ("BUILD_INIT_IMAGE=%s" , initImageName ))
199- if out , err := makeInDir (dir , "image-init" , env ... ); err != nil {
200- logrus .Error (out )
201- return fmt .Errorf ("building init image: %w" , err )
202- }
203-
204- initTag := fmt .Sprintf ("%s/%s:%s" , registry , initImageName , version )
205- if out , err := runCommand ("docker" , []string {
206- "tag" ,
207- fmt .Sprintf ("%s:latest" , initImageName ),
208- fmt .Sprintf ("%s/%s:%s" , registry , initImageName , version ),
209- }, env ); err != nil {
210- logrus .Error (out )
211- return fmt .Errorf ("tagging init image: %w" , err )
212- }
213- logrus .WithField ("tag" , initTag ).Debug ("Built init image" )
214192 return nil
215193}
216194
@@ -240,13 +218,6 @@ func publishHashreleaseOperator(version, imageName, registry string, archs []str
240218 return fmt .Errorf ("pushing manifest: %w" , err )
241219 }
242220 logrus .WithField ("image" , image ).Debug ("Pushed manifest" )
243-
244- initImage := fmt .Sprintf ("%s/%s-init:%s" , registry , imageName , version )
245- if out , err := runCommand ("docker" , []string {"push" , initImage }, nil ); err != nil {
246- logrus .Error (out )
247- return fmt .Errorf ("pushing init image: %w" , err )
248- }
249- logrus .WithField ("image" , initImage ).Debug ("Pushed init image" )
250221 return nil
251222}
252223
0 commit comments