mirror of
https://github.com/mudler/luet.git
synced 2025-08-31 14:52:02 +00:00
Do image export only if we have to generate the package
This commit is contained in:
@@ -318,8 +318,10 @@ func (cs *LuetCompiler) compileWithImage(image, buildertaggedImage, packageImage
|
||||
}
|
||||
}
|
||||
|
||||
if err = cs.Backend.ExportImage(builderOpts); err != nil {
|
||||
return nil, errors.Wrap(err, "Could not export image")
|
||||
if generateArtifact {
|
||||
if err = cs.Backend.ExportImage(builderOpts); err != nil {
|
||||
return nil, errors.Wrap(err, "Could not export image")
|
||||
}
|
||||
}
|
||||
|
||||
if !cs.Options.KeepImageExport {
|
||||
@@ -354,8 +356,10 @@ func (cs *LuetCompiler) compileWithImage(image, buildertaggedImage, packageImage
|
||||
}
|
||||
}
|
||||
|
||||
if err := cs.Backend.ExportImage(runnerOpts); err != nil {
|
||||
return nil, errors.Wrap(err, "Failed exporting image")
|
||||
if generateArtifact {
|
||||
if err := cs.Backend.ExportImage(runnerOpts); err != nil {
|
||||
return nil, errors.Wrap(err, "Failed exporting image")
|
||||
}
|
||||
}
|
||||
|
||||
if !cs.Options.KeepImageExport {
|
||||
|
Reference in New Issue
Block a user