Skip to content
This repository was archived by the owner on May 16, 2022. It is now read-only.

Commit 8e1e53e

Browse files
authored
Merge pull request #55 from jpopelka/0.3.2
0.3.2 release
2 parents e85419e + 48ed8a2 commit 8e1e53e

17 files changed

+224
-15
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 0.3.2
2+
* Iterate over PRs in descending order
3+
* Use nss_wrapper to create/use custom passwd file
4+
* Add status comments to PR
5+
16
# 0.3.0
27
* Structure code into classes
38
* bug fixes, bug fixes, bug fixes

README.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,25 @@ Release bot [![Build Status](https://travis-ci.org/user-cont/release-bot.svg?bra
22
============
33
This is a bot that helps maintainers deliver their software to users. It is meant to watch github repositories for
44
release pull requests. The PR must be named in this format `0.1.0 release`. No other format is supported yet.
5-
Once the PR is merged, bot will create a new github release. Changelog will be pulled from root of the
5+
Once the PR is merged, bot will create a new Github release. Changelog will be pulled from root of the
66
repository and must be named `CHANGELOG.md`. Changelog for the new version must begin with version heading, i.e `# 0.1.0`.
77
Everything between this heading and the heading for previous version will be pulled into the changelog.
88

99
A `release-conf.yaml` file is required. See [Configuration](#configuration) section for details.
1010

11-
Once a release is complete, bot will upload this release to PyPi. Note that you have to setup your login details (see [Requirements](#requirements)).
11+
Once a Github release is complete, bot will upload this release to PyPI. Note that you have to setup your login details (see [Requirements](#requirements)).
1212

13-
After PyPi release, if enabled in `release-conf.yaml`, bot will try to release on Fedora dist-git, on `master` branch and branches specified in configuration.
13+
After PyPI release, if enabled in `release-conf.yaml`, bot will try to release on Fedora dist-git, on `master` branch and branches specified in configuration.
1414
It should not create merge conflicts, but in case it does, you have to solve them first before attempting the release again.
1515

1616

1717
# Configuration
18-
Configuration is in a form of a yaml file. You can specify your config using `-c file.yaml` or `--configuration file.yaml`.
19-
If you do not specify it using an argument, bot will try to find `conf.yaml` in current working directory.
20-
Here are the configuration options:
18+
There are two yaml configuration files, `conf.yaml` and `release-conf.yaml`.
19+
`conf.yaml` must be accessible during bot initialization and specifies how to access Github repository,
20+
while `release-conf.yaml` must be stored in the repository itself and specifies how to do a Github/PyPI/Fedora releases.
21+
If the path to `conf.yaml` is not passed to bot with `-c/--configuration`, bot will try to find it in current working directory.
22+
23+
Here are the `conf.yaml` configuration options:
2124

2225
| Option | Meaning | Required |
2326
|------------- |-------------|-------------|
@@ -27,12 +30,13 @@ Here are the configuration options:
2730
| `fas_username` | [FAS](https://fedoraproject.org/wiki/Account_System) username. Only need for releasing on Fedora| No |
2831
| `refresh_interval` | Time in seconds between checks on repository. Default is 180 | No |
2932

30-
Sample config can be found in this repository.
33+
Sample config named [conf.yaml](conf.yaml) can be found in this repository.
3134

32-
Best option for this is creating a github account for this bot so you can keep track of what changes were made by bot and what are your own.
35+
Regarding `github_token`, it's usually a good idea to create a Github account for the bot (and use its Github API token)
36+
so you can keep track of what changes were made by bot and what are your own.
3337

34-
You also have to have a `release-conf.yaml` file in the root of your project repository.
35-
Here are the possible options:
38+
You also have to have a `release-conf.yaml` file in the root of your project repository.
39+
Here are possible options:
3640

3741
| Option | Meaning | Required |
3842
|---------------|---------------|---------------|
@@ -46,9 +50,13 @@ Here are the possible options:
4650
Sample config named [release-conf-example.yaml](release-conf-example.yaml) can be found in this repository.
4751

4852
# Requirements
49-
Releasing to PyPi requires to have `wheel` package both for python 2 and python 3, therefore please install `requirements.txt` with both versions of `pip`.
50-
You also have to setup your PyPi login details in `$HOME/.pypirc` as described in [PyPi documentation](https://packaging.python.org/tutorials/distributing-packages/#create-an-account)
51-
If you are releasing to Fedora, you will need to have an active kerberos ticket while the bot runs. Also, `fedpkg` requires that you have ssh key in your keyring, that you uploaded to FAS.
53+
Releasing to PyPI requires to have `wheel` package both for python 2 and python 3,
54+
therefore please install `requirements.txt` with both versions of `pip`.
55+
You also have to setup your PyPI login details in `$HOME/.pypirc`
56+
as described in [PyPI documentation](https://packaging.python.org/tutorials/distributing-packages/#create-an-account).
57+
If you are releasing to Fedora, you will need to have an active kerberos ticket while the bot runs
58+
or specify path to kerberos keytab file with `-k/--keytab`.
59+
Also, `fedpkg` requires that you have ssh key in your keyring, that you uploaded to FAS.
5260

5361
# Docker image
5462
To make it easier to run this, release-bot is available as an [source-to-image](https://github.com/openshift/source-to-image) builder image. You need to setup a git repository, where you'll store the `conf.yaml` and `.pypirc` files. If you are releasing on Fedora, you will also need to add `id_rsa` (a private ssh key that you configured in FAS) and `fedora.keytab` (kerberos keytab for fedora). If this is not a local repository, make sure it's private so you prevent any private info leaking out. You can then create the final image like this:

conf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ repository_owner: owner
33
# https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/
44
github_token: xxxxxxxxxxxxxxxxxxxxxxxxx
55
# time in seconds during checks for new releases
6-
refresh_interval: 300
6+
refresh_interval: 180

release_bot/cli.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
116
import argparse
217
import logging
318
from pathlib import Path

release_bot/configuration.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
16+
117
import logging
218
import os
319
from pathlib import Path

release_bot/fedora.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
116
from glob import glob
217
import os
318
from tempfile import TemporaryDirectory

release_bot/github.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
116
from os import listdir
217
import requests
318
from tempfile import TemporaryDirectory

release_bot/pypi.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
116
from glob import glob
217
import os
318
import requests

release_bot/releasebot.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
116
"""
217
This module provides functionality for automation of releasing projects
318
into various downstream services

release_bot/utils.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
116
import shlex
217
import datetime
318
import os

0 commit comments

Comments
 (0)