add linter to exec
This commit is contained in:
parent
797bb4970f
commit
7f533927c7
1 changed files with 6 additions and 0 deletions
|
@ -16,6 +16,7 @@ import (
|
||||||
"github.com/cncd/pipeline/pipeline/frontend"
|
"github.com/cncd/pipeline/pipeline/frontend"
|
||||||
"github.com/cncd/pipeline/pipeline/frontend/yaml"
|
"github.com/cncd/pipeline/pipeline/frontend/yaml"
|
||||||
"github.com/cncd/pipeline/pipeline/frontend/yaml/compiler"
|
"github.com/cncd/pipeline/pipeline/frontend/yaml/compiler"
|
||||||
|
"github.com/cncd/pipeline/pipeline/frontend/yaml/linter"
|
||||||
"github.com/cncd/pipeline/pipeline/interrupt"
|
"github.com/cncd/pipeline/pipeline/interrupt"
|
||||||
"github.com/cncd/pipeline/pipeline/multipart"
|
"github.com/cncd/pipeline/pipeline/multipart"
|
||||||
"github.com/drone/envsubst"
|
"github.com/drone/envsubst"
|
||||||
|
@ -325,6 +326,11 @@ func exec(c *cli.Context) error {
|
||||||
volumes = append(volumes, dir+":"+path.Join(workspaceBase, workspacePath))
|
volumes = append(volumes, dir+":"+path.Join(workspaceBase, workspacePath))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// lint the yaml file
|
||||||
|
if lerr := linter.New(linter.WithTrusted(true)).Lint(conf); lerr != nil {
|
||||||
|
return lerr
|
||||||
|
}
|
||||||
|
|
||||||
// compiles the yaml file
|
// compiles the yaml file
|
||||||
compiled := compiler.New(
|
compiled := compiler.New(
|
||||||
compiler.WithEscalated(
|
compiler.WithEscalated(
|
||||||
|
|
Loading…
Reference in a new issue