Skip to content

Detached pipelines everywhere

Client-Server synchronisation (Blank Flag)

ts
actions: ["blank"];
actions: ["blank"];

When you have pipelight installed client and server side, and you use detahed pipeline triggering with git.

A push to the (git)server triggers both client and server side pipelines nearly simultaneously.

client

on pre-push

server

on update

What if you want to trigger a server side pipeline only once a client side pipeline has resolved whitout having to bring it to the foreground?

A workaround is to send an ssh command to the server at some point in your pipeline. pipelight run <pipeline_name> --flag blank or pipelight trigger --flag blank to trigger the server side pipeline.

And add the required trigger to the pipeline to be executed server-side.

ts
// pipelight.ts
server_pipeline.triggers.push({
  action: ["blank"],
});
// pipelight.ts
server_pipeline.triggers.push({
  action: ["blank"],
});

Emit the trigger signal from the client-side pipeline. Whether it be from a fallback or from a regular pipeline step.

ts
// pipelight.ts
pipeline.on_success = {
  name: "sync",
  commands: `ssh ${host} -C "pipelight run server_side_pipeline --flag blank"`,
};
// pipelight.ts
pipeline.on_success = {
  name: "sync",
  commands: `ssh ${host} -C "pipelight run server_side_pipeline --flag blank"`,
};

and voilà, you have synced your detached pipelines.

client

on pre-push

trigger --flag blank

ssh

server

on blank

Forced flags (Manually set trigger action)

Simulate a specific action to trigger associated pipelines.

sh
pipelight trigger <action>
pipelight trigger <action>

Or trigger a pipeline by simulating the appropriate action.

sh
pipelight run --flag <action>
pipelight run --flag <action>

You can use it for debugging purpose or simply as a way to create unconventionnal pipelines.