Skip to content

Triggers behavior

TIP

The following options can be set globally and overwritten on a per pipeline bases.

Set pipeline default I/O

By default, pipelines are triggerd attached to the standard output.

For example, a git action like git push will wait until the pipelines execution is over before your shell gives you the control back and print another prompt line.

To prevent waiting forever when triggering heavy workloads, you can set the pipeline to be executed detached from the standard output.

ts
const my_pipeline = {
  name: "always_detached_when_triggered_by_git",
  steps: [],
  options: {
    attach: false,
  },
};
const my_pipeline = {
  name: "always_detached_when_triggered_by_git",
  steps: [],
  options: {
    attach: false,
  },
};

When running a pipeline with the command pipelight run, this flag is not interpreted and therefore the pipeline is triggered in the background unless you attach it pipelight run --attach.

Set default log level

Triggering a pipeline in attached state will print the minimum pipeline log.

You can set the default log level Available levels are error, warn, info, debug and trace.

ts
pipeline: {
  options: {
    attach: false;
    log_level: "warn",
  }
}
pipeline: {
  options: {
    attach: false;
    log_level: "warn",
  }
}

Set defaults globally

You can set those defaults globally

ts
config: {
  options: {
    attach: false;
    log_level: "warn",
  }
  pipelines:[]
}
config: {
  options: {
    attach: false;
    log_level: "warn",
  }
  pipelines:[]
}