Skip to content

Add API for manually creating deployments

Yorick Peterse requested to merge deployments-api into master

What does this MR do?

This API can be used for manually creating deployments, instead of being limited to creating deployments using CI pipelines.

As part of these changes, I refactored some parts of the existing deployments code. This ensures we reuse the same logic for creating deployments in different places. We also move the deployments service classes to a Deployments namespace, now that there are two service classes.

We also make some changes to which deployments are displayed. Prior to these changes, only deployments that were successful were displayed. This can get very confusing when using deployments from external systems, so we now show deployments regardless of their status. The table to display deployments has also had some style/content changes to display the deployments data in a more meaningful way.

Fixes #32579 (closed), #25176 (closed)

UI changes

This MR introduces some UI changes to the table that displays deployments:

Desktop (before) Desktop (after) iPad (after) Mobile (after)
Before Desktop iPad Mobile

NOTE: the screenshots show the text "Manual", but this has been changed to "API".

The changes in question are:

  1. Both the creation and deployment times are displayed, instead of just the deployment time. This is useful since we now show failed and running deployments as well.
  2. The person that triggered the deploy is now displayed separately, as there are no associated jobs for manual deployments.
  3. When a deployment was created manually, we display a label instead of the job details. Hovering over the label shows a tooltip with some additional information.
  4. The deployment status is displayed, as we no longer limit the list of deployments to those that were successful.
  5. The created at/deployed at timestamps are truncated when there is not enough space
  6. The column widths have been adjusted to fit all this new information

TODO

  • Add tests for the API code
  • Update API documentation
  • Test UI on mobile

Does this MR meet the acceptance criteria?

Conformity

Edited by Yorick Peterse

Merge request reports