Don't bail out if image doesn't exist locally

The backend will figure out if we have the image or not, otherwise will
atempt to pull if not there.

Skip retrieve integration test with img as its not supported.
This commit is contained in:
Ettore Di Giacinto
2021-01-24 19:04:57 +01:00
parent be87861657
commit 6f5f400765
5 changed files with 12 additions and 4 deletions

View File

@@ -288,8 +288,6 @@ func (cs *LuetCompiler) unpackDelta(concurrency int, keepPermissions bool, p Com
if err != nil {
return nil, errors.Wrap(err, "Could not pull image")
}
} else if !cs.Backend.ImageExists(builderOpts.ImageName) {
return nil, errors.New("No image found for " + builderOpts.ImageName)
}
Info(pkgTag, ":hammer: Generating delta")
@@ -298,6 +296,7 @@ func (cs *LuetCompiler) unpackDelta(concurrency int, keepPermissions bool, p Com
return nil, errors.Wrap(err, "Could not generate changes from layers")
}
Debug("Extracting image to grab files from delta")
if err := cs.Backend.ExtractRootfs(CompilerBackendOptions{
ImageName: runnerOpts.ImageName, Destination: rootfs}, keepPermissions); err != nil {
return nil, errors.Wrap(err, "Could not extract rootfs")