Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adfinis/gitlab-pkgbot
The Package Bot - A simple service which receives HTTP build triggers from GitLab, gets the built packages and puts them in aptly and RPM repos.
https://github.com/adfinis/gitlab-pkgbot
automation bot gitlab gitlab-ci packages webhook
Last synced: 7 days ago
JSON representation
The Package Bot - A simple service which receives HTTP build triggers from GitLab, gets the built packages and puts them in aptly and RPM repos.
- Host: GitHub
- URL: https://github.com/adfinis/gitlab-pkgbot
- Owner: adfinis
- License: gpl-3.0
- Created: 2017-05-11T12:01:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-08-16T13:24:59.000Z (over 2 years ago)
- Last Synced: 2024-05-21T01:49:52.222Z (6 months ago)
- Topics: automation, bot, gitlab, gitlab-ci, packages, webhook
- Language: Python
- Homepage:
- Size: 103 KB
- Stars: 7
- Watchers: 13
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitLab Package Bot
A simple service which receives HTTP build triggers from GitLab, gets the built
packages and puts them in aptly and RPM repos.## Installation
```
# apt-get install python-yaml python-pip
# pip install python-gitlab
```Clone this repository and switch into the directory:
```
# python setup.py install
# mkdir /var/run/aptly-spooler
# chown mirror:mirror /var/run/aptly-spooler
```## Configuration & Administration
### Configuration
The main config file for the bot is located at `/etc/gitlab-pkgbot.yaml`.
### Administration
It runs as a systemd service. You can view logs with the following command:
```
# journalctl -u gitlab-pkgbot.service
```## aptly-spooler
Since aptly can only run one command at once, this script sets up a simple
"spooler" for running all aptly commands.
This is implemented via a FIFO-Socket located at
`/var/run/aptly-spooler/fifo.sock`. The socket accepts commands seperated by
newlines and executes them one by one.You can manually pipe commands into this spooler as well:
```
# echo "sleep 10" > /var/run/aptly-spooler/fifo.sock
# echo "ps -efH" > /var/run/aptly-spooler/fifo.sock
```It runs as a systemd service. You can view logs with the following command:
```
# journalctl -u aptly-spooler.service
```## Mirror preparation
The bot copies the extracted packages into a specific directory tree before
adding them to the specific repositories. Meaning the required directories have
to be created first:
```
# cd /path/to/your/mirror/dir
# mkdir -p centos/{6,7} redhat/{6,7} debian/{jessie,wheezy} \
ubuntu/{trusty,vivid,xenial}mkdir -p centos/{6,7} rhel/{6,7}
# chown -R mirror:mirror /path/to/your/mirror/dir
```## Contributions
Contributions are more than welcome! Please feel free to open new issues or
pull requests.## License
GNU GENERAL PUBLIC LICENSE Version 3
See the [LICENSE](LICENSE) file.