···
203
-
pipelineParseErrors := []string{}
205
-
var pipeline workflow.Pipeline
203
+
var pipeline workflow.RawPipeline
for _, e := range workflowDir {
···
217
-
wf, err := workflow.FromFile(e.Name, contents)
219
-
h.l.Error("failed to parse workflow", "err", err, "path", fpath)
220
-
pipelineParseErrors = append(pipelineParseErrors, fmt.Sprintf("- at %s: %s\n", fpath, err))
224
-
pipeline = append(pipeline, wf)
215
+
pipeline = append(pipeline, workflow.RawWorkflow{
217
+
Contents: contents,
trigger := tangled.Pipeline_PushTriggerData{
···
245
-
cp := compiler.Compile(pipeline)
239
+
cp := compiler.Compile(compiler.Parse(pipeline))
eventJson, err := json.Marshal(cp)
if pushOptions.verboseCi {
252
-
hasDiagnostics := false
253
-
if len(pipelineParseErrors) > 0 {
254
-
hasDiagnostics = true
255
-
*clientMsgs = append(*clientMsgs, "error: failed to parse workflow(s):")
256
-
for _, error := range pipelineParseErrors {
257
-
*clientMsgs = append(*clientMsgs, error)
260
-
if len(compiler.Diagnostics.Errors) > 0 {
261
-
hasDiagnostics = true
262
-
*clientMsgs = append(*clientMsgs, "error(s) on pipeline:")
263
-
for _, error := range compiler.Diagnostics.Errors {
264
-
*clientMsgs = append(*clientMsgs, fmt.Sprintf("- %s:", error))
246
+
if compiler.Diagnostics.IsEmpty() {
247
+
*clientMsgs = append(*clientMsgs, "success: pipeline compiled with no diagnostics")
267
-
if len(compiler.Diagnostics.Warnings) > 0 {
268
-
hasDiagnostics = true
269
-
*clientMsgs = append(*clientMsgs, "warning(s) on pipeline:")
270
-
for _, warning := range compiler.Diagnostics.Warnings {
271
-
*clientMsgs = append(*clientMsgs, fmt.Sprintf("- at %s: %s: %s", warning.Path, warning.Type, warning.Reason))
250
+
for _, e := range compiler.Diagnostics.Errors {
251
+
*clientMsgs = append(*clientMsgs, e.String())
274
-
if !hasDiagnostics {
275
-
*clientMsgs = append(*clientMsgs, "success: pipeline compiled with no diagnostics")
254
+
for _, w := range compiler.Diagnostics.Warnings {
255
+
*clientMsgs = append(*clientMsgs, w.String())