From b828d68653ba4f342249592a8bbf8e89e6fbb25d Mon Sep 17 00:00:00 2001 From: Fabian Kramm Date: Thu, 23 Jun 2022 10:01:29 +0200 Subject: [PATCH] feat: allow command override --- pkg/devspace/pipeline/engine/pipelinehandler/handler.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/devspace/pipeline/engine/pipelinehandler/handler.go b/pkg/devspace/pipeline/engine/pipelinehandler/handler.go index 6f0bdec76c..f55cdc693e 100644 --- a/pkg/devspace/pipeline/engine/pipelinehandler/handler.go +++ b/pkg/devspace/pipeline/engine/pipelinehandler/handler.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/loft-sh/devspace/pkg/devspace/pipeline/engine" "io" + "strings" "github.com/sirupsen/logrus" @@ -154,6 +155,14 @@ func (e *execHandler) handlePipelineCommands(ctx context.Context, command string }) } + // resolve internal pipeline commands + pipelineCommand, ok = PipelineCommands[strings.TrimPrefix(command, "__")] + if ok { + return e.executePipelineCommand(ctx, command, func() error { + return pipelineCommand(devCtx, e.pipeline, args) + }) + } + return false, nil }