Available node types
Pipelines can be made up of Jobs, Deployments or multi-node (MMT) jobs.
Types
| Name | Action |
|---|---|
| JobStep | Create a new Job when the step is executed |
| MMTStep | Create a new MMT Job when the step is executed |
| DeploymentStep | Create a new Deployment Job when the step is executed |
| DeploymentReleaseStep | Create a new Release over an existing deployment when the step is executed |
Code
from lightning_sdk.pipeline import Pipeline, JobStep, MMTStep, DeploymentStep
from lightning_sdk.machine import Machine
pipeline = Pipeline(name='third-pipeline')
pipeline.run(
steps=[
JobStep(
name='job-1',
image="ubuntu:latest",
machine=Machine.CPU,
command="sleep 9 && echo 'Hello, World!'"
),
MMTStep(
name='mmt-2',
image="ubuntu:latest",
machine=Machine.CPU,
command="echo 'Hello, World!'",
wait_for=None,
),
DeploymentStep(
name='deployment-3',
image="nginx",
machine=Machine.CPU,
ports=[8000],
),
]
)===== Generated Pipeline =====
0 - Job['job-1'] wait_for nothing
1 - MMT['mmt-2'] wait_for nothing
2 - Deployment['deployment-3'] wait_for ['job-1', 'mmt-2']
===== ================== =====The resulting Pipeline

Was this page helpful?
Thanks for the feedback.