A deployment attempt and its progress.
Attributes
| Name | Type | Description |
|---|---|---|
| deployment_id | uuid.UUID | technical id, what the front-end polls on. |
| pipeline_key | str | pipeline being deployed. |
| pipeline_id | uuid.UUID | its technical id. |
| source | str | ref the user deployed FROM (feature/..., master, release/...). |
| release | str | the release ref this deployment produces or reuses. |
| sha | str | commit the release resolves to — what actually runs. |
| packaging | str | 'image' (frozen artifact) or 'release' (run from the branch). |
| image_id | str | built image, when packaging='image'. |
| trigger_id | uuid.UUID | schedule created or updated at the end. |
| status | DeploymentStatus | overall state — pending / deploying / deployed / paused / failed. Deliberately not "running" or "completed": a user reads those as "is my pipeline executing", which is a different question entirely. |
| steps | list | [detail] in execution order. |
| error | str | failure reason when status is FAILED. |
| manifest | dict | the deploy request as executed. |
| created_by | str | email of the user who launched it. |
| createdDate | int | timestamp ms. |
| updatedDate | int | timestamp ms. |
Methods
api_id()
return current object id on Web API format.
api_key()
return current object logical unique key (e.g. hardware_id, key, name).
returns None if the entity has no logical key.
endpoint()
return endpoint name used to contact backend.
from_json()
load the object from a dict originating of a JSON format.
| Name | Type | Default | Description |
|---|---|---|---|
| obj | object to load information from. |
is_done()
True when a step needs no further work — completed or not planned.
| Name | Type | Default | Description |
|---|---|---|---|
| step | DeploymentStep |
set_id()
specify the id_value neutrally
| Name | Type | Default | Description |
|---|---|---|---|
| id_value | |||
| return: |
set_step()
Record a step's outcome, replacing any previous entry for it so a retry
does not append duplicates.
| Name | Type | Default | Description |
|---|---|---|---|
| step | DeploymentStep | ||
| status | StepStatus | ||
| detail | None |
step_status()
| Name | Type | Default | Description |
|---|---|---|---|
| step | DeploymentStep |
to_dict()
Serialize the Deployment. Alias of :meth:to_json, which is the
canonical implementation here — the DTO convention accepts either
spelling, and the client calls to_dict.
to_json()
transform current object into a dict that could be JSONIFY.
| Name | Type | Default | Description |
|---|---|---|---|
| target | str | None | |
| return: dumpable dict. |