Skip to content

Commit cc9595a

Browse files
feat: add docs for build in-obs (#897)
feat: add docs for build in-obs Add docs for packit build in-obs Reviewed-by: Dan Čermák <dcermak@suse.com> Reviewed-by: Bryan Elee Reviewed-by: František Lachman <flachman@redhat.com>
2 parents 089d58e + 0c90191 commit cc9595a

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

authors.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,9 @@ venefilyn:
5656
email: freya@venefilyn.se
5757
url: https://github.com/Venefilyn
5858
image_url: https://github.com/Venefilyn.png
59+
60+
rxbryan:
61+
name: Bryan Elee
62+
email: rxbryn@gmail.com
63+
url: https://github.com/rxbryan
64+
image_url: https://github.com/rxbryan.png

docs/cli/build/in-obs.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: in-obs
3+
date: 2024-06-27
4+
sidebar_position: 5
5+
---
6+
7+
# `packit build in-obs`
8+
9+
Submit a build of the present content in the upstream or local repository to [OBS](https://build.opensuse.org/).
10+
11+
## Requirements
12+
13+
* SPEC file for the project placed in the repository.
14+
* Packit config file placed in the repository.
15+
* OBS user account and password needs to be configured in osc configuration file ~/.config/osc/oscrc.
16+
This can be done by running `osc`.
17+
18+
19+
## Tutorial
20+
21+
1. [Place a config file for packit in the root of your upstream repository.](/docs/configuration/)
22+
23+
2. The command below creates a tarball (archive) of your repository and commits it along with the spec file to a package with a name corresponding to your upstream project on [OBS](https://build.opensuse.org/). The project defaults to home:$username:packit. Running packit build in-obs a second time creates a new commit in that package.
24+
25+
```
26+
$ cd my/ustream/project/
27+
$ packit build in-obs --project <project_name>
28+
```
29+
## Help
30+
31+
Usage: packit build in-obs [OPTIONS] [PATH_OR_URL]
32+
33+
Build selected project in OBS
34+
35+
Before Running this command, your opensuse user account and password needs
36+
to be configured in osc configuration file ~/.config/osc/oscrc. This can be
37+
done by running `osc`.
38+
39+
Options:
40+
--owner TEXT OBS user, owner of the project. (defaults to the
41+
username from the oscrc)
42+
--project TEXT Project name to build in. It will be created if does
43+
not exist. It defaults to home:$owner:packit:$pkg
44+
--targets TEXT Comma separated list of chroots to build in. (defaults
45+
to 'fedora-rawhide-x86_64')
46+
--description TEXT Description of the project to build in.
47+
--upstream-ref TEXT Git ref of the last upstream commit in the current
48+
branch from which packit should generate patches (this
49+
option implies the repository is source-git).
50+
--wait / --no-wait Wait for the build to finish
51+
-p, --package TEXT Package to build, if more than one available, like in a
52+
monorepo configuration. Use it multiple times to select
53+
multiple packages.Defaults to all the packages listed
54+
inside the config.
55+
-h, --help Show this message and exit.

docs/cli/build/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Subcommand that groups all RPM build related commands together.
1616
* [`in-mock`](/docs/cli/build/in-mock)
1717
* [`in-copr`](/docs/cli/build/in-copr)
1818
* [`in-koji`](/docs/cli/build/in-koji)
19+
* [`in-obs`](/docs/cli/build/in-obs)
1920
* [`in-image-builder`](/docs/cli/build/in-image-builder)
2021

2122
## Help
@@ -32,5 +33,6 @@ Subcommand that groups all RPM build related commands together.
3233
in-copr Build selected upstream project in Copr.
3334
in-image-builder Create a VM image in Image Builder.
3435
in-koji Build selected upstream project in Fedora.
36+
in-obs Build selected repository in Open Build Service
3537
in-mock Build RPMs in mock using content of the upstream repository.
3638
locally Create RPMs using content of the upstream repository.

0 commit comments

Comments
 (0)