Page MenuHomePhabricator

[buildservice-api] Create a build POST endpoint to start a new build
Closed, ResolvedPublic

Description

This task is to create a single endpoint to start a new build and remove that logic from the client, currently just with the same logic as the client has.

This is a high priority endpoint as it will unblock:

  • Creating the destination repository on the fly (and thus, potentially deprecating the maintain-harbor tool/system)
  • Set limits on the amount of bulids a user can create
  • Multi-buildpacks/special request buildpacks features
  • Old build cleanup

Details

TitleReferenceAuthorSource BranchDest Branch
Add create build endpointrepos/cloud/toolforge/builds-api!5dcaroadd_build_create_endpointmain
Add tests for auth and buildrepos/cloud/toolforge/builds-api!4dcaroadd_testsmain
api_client: return the response for any type of requestrepos/cloud/toolforge/toolforge-weld!15dcaroapi_client_return_objectsmain
Customize query in GitLab

Event Timeline

dcaro changed the task status from Open to In Progress.May 22 2023, 9:27 AM
dcaro removed projects: Goal, Epic.
dcaro moved this task from Backlog to Doing on the Toolforge Build Service (Beta release) board.

Let's start by only allowing to specify the git ref to build (default to the repo's default branch HEAD), as I suspect that both the tag and the image name will eventually be replaced by "app name" and that's it (no need to expose the user to an image abstraction).

Change 922509 had a related patch set uploaded (by David Caro; author: David Caro):

[cloud/toolforge/toolforge-cli@main] builds: move create to api endpoint

https://gerrit.wikimedia.org/r/922509

Change 922509 abandoned by David Caro:

[cloud/toolforge/toolforge-cli@main] builds: move create to api endpoint

Reason:

Moved to https://gitlab.wikimedia.org/repos/cloud/toolforge/toolforge-cli/-/merge_requests/1

https://gerrit.wikimedia.org/r/922509

Mentioned in SAL (#wikimedia-cloud) [2023-05-25T08:40:42Z] <dcaro> releasing toolforge-weld 1.0.0 (T337218)

Mentioned in SAL (#wikimedia-cloud-feed) [2023-06-01T07:18:41Z] <wm-bot2> deployed kubernetes component https://gitlab.wikimedia.org/repos/cloud/toolforge/toolforge-builds-api (3488cfe) (T337218) - cookbook ran by dcaro@vulcanus

Mentioned in SAL (#wikimedia-cloud-feed) [2023-06-01T10:04:15Z] <wm-bot2> deployed kubernetes component https://gitlab.wikimedia.org/repos/cloud/toolforge/toolforge-builds-api (7e57832) (T337218) - cookbook ran by dcaro@vulcanus

Mentioned in SAL (#wikimedia-cloud-feed) [2023-06-01T10:07:26Z] <wm-bot2> deployed kubernetes component https://gitlab.wikimedia.org/repos/cloud/toolforge/toolforge-builds-api (7e57832) (T337218) - cookbook ran by dcaro@vulcanus

dcaro moved this task from Doing to Done on the Toolforge Build Service (Beta release) board.