2
0
Эх сурвалжийг харах

add use pack cache value for push-image

Mohammed Nafees 4 жил өмнө
parent
commit
d5b5d02e15

+ 9 - 2
cli/cmd/preview/push_image_driver.go

@@ -12,8 +12,9 @@ import (
 
 type PushDriverConfig struct {
 	Push struct {
-		ForcePush bool `mapstructure:"force_push"`
-		Image     string
+		ForcePush    bool `mapstructure:"force_push"`
+		UsePackCache bool `mapstructure:"use_pack_cache"`
+		Image        string
 	}
 }
 
@@ -56,6 +57,12 @@ func (d *PushDriver) Apply(resource *models.Resource) (*models.Resource, error)
 
 	d.config = pushDriverConfig
 
+	if d.config.Push.UsePackCache {
+		d.output["image"] = d.config.Push.Image
+
+		return resource, nil
+	}
+
 	client := config.GetAPIClient()
 
 	agent, err := docker.NewAgentWithAuthGetter(client, d.target.Project)