···
-
pipelineParseErrors := []string{}
-
var pipeline workflow.Pipeline
for _, e := range workflowDir {
···
-
wf, err := workflow.FromFile(e.Name, contents)
-
h.l.Error("failed to parse workflow", "err", err, "path", fpath)
-
pipelineParseErrors = append(pipelineParseErrors, fmt.Sprintf("- at %s: %s\n", fpath, err))
-
pipeline = append(pipeline, wf)
trigger := tangled.Pipeline_PushTriggerData{
···
-
cp := compiler.Compile(pipeline)
eventJson, err := json.Marshal(cp)
if pushOptions.verboseCi {
-
hasDiagnostics := false
-
if len(pipelineParseErrors) > 0 {
-
*clientMsgs = append(*clientMsgs, "error: failed to parse workflow(s):")
-
for _, error := range pipelineParseErrors {
-
*clientMsgs = append(*clientMsgs, error)
-
if len(compiler.Diagnostics.Errors) > 0 {
-
*clientMsgs = append(*clientMsgs, "error(s) on pipeline:")
-
for _, error := range compiler.Diagnostics.Errors {
-
*clientMsgs = append(*clientMsgs, fmt.Sprintf("- %s:", error))
-
if len(compiler.Diagnostics.Warnings) > 0 {
-
*clientMsgs = append(*clientMsgs, "warning(s) on pipeline:")
-
for _, warning := range compiler.Diagnostics.Warnings {
-
*clientMsgs = append(*clientMsgs, fmt.Sprintf("- at %s: %s: %s", warning.Path, warning.Type, warning.Reason))
-
*clientMsgs = append(*clientMsgs, "success: pipeline compiled with no diagnostics")
···
+
var pipeline workflow.RawPipeline
for _, e := range workflowDir {
···
+
pipeline = append(pipeline, workflow.RawWorkflow{
trigger := tangled.Pipeline_PushTriggerData{
···
+
cp := compiler.Compile(compiler.Parse(pipeline))
eventJson, err := json.Marshal(cp)
if pushOptions.verboseCi {
+
if compiler.Diagnostics.IsEmpty() {
+
*clientMsgs = append(*clientMsgs, "success: pipeline compiled with no diagnostics")
+
for _, e := range compiler.Diagnostics.Errors {
+
*clientMsgs = append(*clientMsgs, e.String())
+
for _, w := range compiler.Diagnostics.Warnings {
+
*clientMsgs = append(*clientMsgs, w.String())