Skip to content

Commit

Permalink
Merge pull request #13995 from hellcp-work/apidocs-sources-package-bu…
Browse files Browse the repository at this point in the history
…ilds

Document POST `/source/{project_name}/{package_name}?cmd=collectbuildenv` endpoints
  • Loading branch information
eduardoj authored Mar 16, 2023
2 parents d1e8274 + e2164e9 commit 85755f3
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/public/apidocs-new/OBS-v2.10.50.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ paths:
$ref: 'paths/source_project_name_package_name_attribute_attribute_name.yaml'
/source/{project_name}/{package_name}/_history:
$ref: 'paths/source_project_name_package_name_history.yaml'
/source/{project_name}/{package_name}?cmd=collectbuildenv:
$ref: 'paths/source_project_name_package_name_cmd_collectbuildenv.yaml'
/source/{project_name}/{package_name}?cmd=commit:
$ref: 'paths/source_project_name_package_name_cmd_commit.yaml'
/source/{project_name}/{package_name}?cmd=commitfilelist:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
post:
summary: Collect build environment information.
description: |
Creates _buildenv files based on origin package builds. This can be used
to re-use exact older build enviroment even when further new binary packages
got added. For example to re-build an old maintenance update in the same way.
security:
- basic_authentication: []
parameters:
- $ref: '../components/parameters/project_name.yaml'
- $ref: '../components/parameters/package_name.yaml'
- in: query
name: oproject
required: true
schema:
type: string
description: Origin project. The project that the Origin Package will have the build information copied from.
- in: query
name: opackage
schema:
type: string
description: Origin package. Build environment information of the package that will be copied.
- in: query
name: orev
schema:
type: string
description: Origin package revision. Revision of the Origin Package on which to base the build environment collection.
- in: query
name: comment
description: Comment for the new revision.
responses:
'200':
description: OK
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/revision.yaml'
examples:
Copy:
value:
rev: 3
vrev: 3
srcmd5: d41d8cd98f00b204e9800998ecf8427e
version: 20220902.37b45c2
time: 1678785078
user: Admin
comment: Copying the build environment from origin
requestid:
'400':
description: |
Bad Request.
XML Schema used for body validation: [status.xsd](../schema/status.xsd)
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/api_response.yaml'
examples:
Missing Parameter:
value:
code: missing_parameter
summary: Required Parameter opackage missing
Bad Revision:
value:
code: 400
origin: backend
summary: "bad revision '-3'"
'401':
$ref: '../components/responses/unauthorized.yaml'
'403':
description: Forbidden.
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/api_response.yaml'
example:
code: cmd_execution_no_permission
summary: no permission to modify package test in project home:Admin
'404':
$ref: '../components/responses/unknown_project_or_package.yaml'
tags:
- Sources - Packages

0 comments on commit 85755f3

Please sign in to comment.