Skip to content

Commit

Permalink
Output
Browse files Browse the repository at this point in the history
  • Loading branch information
feloy committed Nov 18, 2021
1 parent bf7d0c5 commit 64cc361
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Expand Up @@ -43,6 +43,8 @@ func (o componentKubernetes) Apply(devfileObj parser.DevfileObj, devfilePath str
if err != nil {
return err
}

log.Infof("\nDeploying Kubernetes %s: %s", u.GetKind(), u.GetName())
isOperatorBackedService, err := service.PushKubernetesResource(o.client.GetKubeClient(), u, labels)
if err != nil {
return errors.Wrap(err, "failed to create service(s) associated with the component")
Expand Down
4 changes: 4 additions & 0 deletions pkg/devfile/image/docker_compatible.go
Expand Up @@ -9,6 +9,7 @@ import (
"strings"

devfile "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
"github.com/openshift/odo/pkg/log"
"k8s.io/klog"
)

Expand All @@ -27,6 +28,8 @@ func (o *DockerCompatibleBackend) Build(image *devfile.ImageComponent, devfilePa
return errors.New("HTTP URL for uri is not supported")
}

log.Infof("\nBuilding image %s", image.ImageName)

shell := getShellCommand(o.name, image, devfilePath)

cmd := exec.Command("bash", "-c", shell)
Expand Down Expand Up @@ -56,6 +59,7 @@ func getShellCommand(cmdName string, image *devfile.ImageComponent, devfilePath

// Push an image to its registry using a Docker compatible CLI
func (o *DockerCompatibleBackend) Push(image string) error {
log.Infof("\nPushing image %s", image)
klog.V(4).Infof("Running command: %s push %s", o.name, image)
cmd := exec.Command(o.name, "push", image)
cmd.Stdout = os.Stdout
Expand Down

0 comments on commit 64cc361

Please sign in to comment.