52 lines
2.2 KiB
Markdown
52 lines
2.2 KiB
Markdown
Direct Workflow bot
|
|
===================
|
|
|
|
The project submodule is automatically updated by the direct bot whenever a branch is updated in a package repository.
|
|
This bot can coexist with the Workflow PR bot, which is instead triggered by a new package PR.
|
|
|
|
Target Usage
|
|
------------
|
|
|
|
Devel project, where direct pushes to package git are possible.
|
|
|
|
Areas of responsibility
|
|
-----------------------
|
|
|
|
1. Keep ProjectGit in sync with packages in the organization
|
|
* **On pushes to package**: updates the submodule commit ID to the default branch HEAD (as configured in Gitea).
|
|
* **On repository adds**: creates a new submodule (if non-empty).
|
|
* **On repository removal**: removes the submodule.
|
|
|
|
**Note:** If you want to revert a change in a package, you need to do that manually in the project git.
|
|
|
|
|
|
Configuration
|
|
-------------
|
|
|
|
Uses `workflow.config` for configuration.
|
|
|
|
| Field name | Details | Mandatory | Type | Allowed Values | Default |
|
|
| ----- | ----- | ----- | ----- | ----- | ----- |
|
|
| *Workflows* | Type of workflow | yes | string | “direct” | |
|
|
| *Organization* | The organization that holds all the packages | yes | string | | |
|
|
| *Branch* | The designated branch for packages | no | string | | blank (default package branch) |
|
|
| *GitProjectName* | Repository and branch where the ProjectGit lives. | no | string | **Format**: `org/project_repo#branch` | By default assumes `_ObsPrj` with default branch in the *Organization* |
|
|
|
|
NOTE: `-rm`, `-removed`, `-deleted` are all removed suffixes used to indicate current branch is a placeholder for previously existing package. These branches will be ignored by the bot, and if default, the package will be removed and will not be added to the project.
|
|
|
|
|
|
Environment Variables
|
|
-------
|
|
|
|
* `GITEA_TOKEN` (required)
|
|
* `AMQP_USERNAME` (required)
|
|
* `AMQP_PASSWORD` (required)
|
|
* `AUTOGITS_CONFIG` (required)
|
|
* `AUTOGITS_URL` - default: https://src.opensuse.org
|
|
* `AUTOGITS_RABBITURL` - default: amqps://rabbit.opensuse.org
|
|
* `AUTOGITS_DEBUG` - disabled by default, set to any value to enable
|
|
* `AUTOGITS_CHECK_ON_START` - disabled by default, set to any value to enable
|
|
* `AUTOGITS_REPO_PATH` - default is temporary directory
|
|
* `AUTOGITS_IDENTITY_FILE` - in case where we need explicit identify path for ssh specified
|
|
|