mirror of
https://github.com/harness/drone.git
synced 2025-04-28 05:36:58 +00:00
fix templating reg expression to match if .drone.yml contains --- characters (#3131)
* issue with regular expression for templates not picking up --- in drone.yml file
This commit is contained in:
parent
5426fb7b31
commit
e8fb0cfca6
plugin/converter
@ -36,7 +36,7 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
// templateFileRE regex to verifying kind is template.
|
// templateFileRE regex to verifying kind is template.
|
||||||
templateFileRE = regexp.MustCompile("^kind:\\s+template+\\n")
|
templateFileRE = regexp.MustCompilePOSIX("^kind:[[:space:]]+template[[:space:]]?+$")
|
||||||
errTemplateNotFound = errors.New("template converter: template name given not found")
|
errTemplateNotFound = errors.New("template converter: template name given not found")
|
||||||
errTemplateSyntaxErrors = errors.New("template converter: there is a problem with the yaml file provided")
|
errTemplateSyntaxErrors = errors.New("template converter: there is a problem with the yaml file provided")
|
||||||
errTemplateExtensionInvalid = errors.New("template extension invalid. must be yaml, starlark or jsonnet")
|
errTemplateExtensionInvalid = errors.New("template extension invalid. must be yaml, starlark or jsonnet")
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
kind: template
|
kind: template
|
||||||
load: plugin.starlark
|
load: plugin.starlark
|
||||||
data:
|
data:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user