-
Notifications
You must be signed in to change notification settings - Fork 54
feat: add docs for build in-obs #897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| --- | ||
| title: in-obs | ||
| date: 2024-06-27 | ||
| sidebar_position: 5 | ||
| --- | ||
|
|
||
| # `packit build in-obs` | ||
|
|
||
| Submit a build of the present content in the upstream or local repository to [OBS](https://build.opensuse.org/). | ||
|
|
||
| ## Requirements | ||
|
|
||
| * SPEC file for the project placed in the repository. | ||
| * Packit config file placed in the repository. | ||
| * OBS user account and password needs to be configured in osc configuration file ~/.config/osc/oscrc. | ||
| This can be done by running `osc`. | ||
|
|
||
|
|
||
| ## Tutorial | ||
|
|
||
| 1. [Place a config file for packit in the root of your upstream repository.](/docs/configuration/) | ||
|
|
||
| 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. | ||
|
|
||
| ``` | ||
| $ cd my/ustream/project/ | ||
| $ packit build in-obs --project <project_name> | ||
| ``` | ||
| ## Help | ||
|
|
||
| Usage: packit build in-obs [OPTIONS] [PATH_OR_URL] | ||
|
|
||
| Build selected project in OBS | ||
|
|
||
| Before Running this command, your opensuse user account and password needs | ||
| to be configured in osc configuration file ~/.config/osc/oscrc. This can be | ||
| done by running `osc`. | ||
|
|
||
| Options: | ||
| --owner TEXT OBS user, owner of the project. (defaults to the | ||
| username from the oscrc) | ||
| --project TEXT Project name to build in. It will be created if does | ||
| not exist. It defaults to home:$owner:packit:$pkg | ||
| --targets TEXT Comma separated list of chroots to build in. (defaults | ||
| to 'fedora-rawhide-x86_64') | ||
| --description TEXT Description of the project to build in. | ||
| --upstream-ref TEXT Git ref of the last upstream commit in the current | ||
| branch from which packit should generate patches (this | ||
| option implies the repository is source-git). | ||
| --wait / --no-wait Wait for the build to finish | ||
| -p, --package TEXT Package to build, if more than one available, like in a | ||
| monorepo configuration. Use it multiple times to select | ||
| multiple packages.Defaults to all the packages listed | ||
| inside the config. | ||
| -h, --help Show this message and exit. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if you know this, but this is being regenerated automatically from the real help message so you don't need to take care of updating.. Also, what you put into the help message can be edited in one place (~
packitproject) and is then visible both in the help message and on docs...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script is here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay so the help section is updated automatically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we leave the other sections in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, yes!