Skip to content

Commit 103f355

Browse files
cd: publish RPM artifacts
Publish RPM artifacts on tag. To test, comment "run only on tags" condition, change RWS_REPO to https://rws-dev.tarantool.org. See [1] about OS support. 1. #257 Part of #198
1 parent 036ecf9 commit 103f355

File tree

5 files changed

+90
-10
lines changed

5 files changed

+90
-10
lines changed

.github/workflows/packing.yml

+52-10
Original file line numberDiff line numberDiff line change
@@ -283,21 +283,19 @@ jobs:
283283
runs-on: ubuntu-20.04
284284

285285
container:
286-
image: ${{ matrix.os }}.${{ matrix.dist }}
286+
image: ${{ matrix.target.os }}:${{ matrix.target.dist }}
287287

288288
strategy:
289289
fail-fast: false
290290

291291
matrix:
292-
os: []
293-
dist: []
294-
include:
295-
- os: fedora
296-
dist: 34
297-
- os: fedora
298-
dist: 35
299-
- os: fedora
300-
dist: 36
292+
target:
293+
- os: fedora
294+
dist: '34'
295+
- os: fedora
296+
dist: '35'
297+
- os: fedora
298+
dist: '36'
301299

302300
steps:
303301
- name: Clone the connector repo
@@ -328,3 +326,47 @@ jobs:
328326

329327
- name: Run tests
330328
run: make test-pure-install
329+
330+
publish_rpm:
331+
# if: startsWith(github.ref, 'refs/tags')
332+
if: (github.event_name == 'push') ||
333+
(github.event_name == 'pull_request' &&
334+
github.event.pull_request.head.repo.full_name != github.repository)
335+
336+
needs:
337+
- run_tests_rpm
338+
339+
runs-on: ubuntu-20.04
340+
341+
strategy:
342+
fail-fast: false
343+
344+
matrix:
345+
target:
346+
- os: fedora
347+
dist: '34'
348+
- os: fedora
349+
dist: '35'
350+
- os: fedora
351+
dist: '36'
352+
353+
steps:
354+
- name: Clone the connector repo
355+
uses: actions/checkout@v3
356+
357+
- name: Install tools for package publishing
358+
run: apt install -y curl
359+
360+
- name: Download pip package artifacts
361+
uses: actions/download-artifact@v3
362+
with:
363+
name: rpm_dist
364+
path: rpm_dist
365+
366+
- name: Publish artifacts
367+
run: make rpm-dist-publish
368+
env:
369+
RWS_REPO: https://rws-dev.tarantool.org
370+
RWS_AUTH: ${{ secrets.RWS_AUTH }}
371+
OS: ${{ matrix.target.os }}
372+
DIST: ${{ matrix.target.dist }}

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
188188
- Pack pip artifacts with GitHub Actions (#198).
189189
- Publish pip artifacts with GitHub Actions (#198).
190190
- Pack RPM artifacts with GitHub Actions (#164, #198).
191+
- Publish RPM artifacts with GitHub Actions (#164, #198).
191192

192193
### Changed
193194
- Bump msgpack requirement to 1.0.4 (PR #223).

Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,9 @@ rpm-dist:
6161
.PHONY: rpm-dist-check
6262
rpm-dist-check:
6363
rpm -K --nosignature rpm_dist/*.rpm
64+
65+
.PHONY: rpm-dist-publish
66+
rpm-dist-publish:
67+
$(eval FILE_FLAGS := $(shell find rpm_dist/ -type f -regex '.*rpm' | xargs -I {} sh -c 'echo -F $$(basename {})=@{}' | xargs))
68+
curl -v -LfsS -X PUT ${RWS_REPO}/release/modules/${OS}/${DIST} \
69+
-F product=python3-tarantool $(FILE_FLAGS) -u ${RWS_AUTH}

README.rst

+17
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,23 @@ The recommended way to install the ``tarantool`` package is using ``pip``.
2626
2727
$ pip3 install tarantool
2828
29+
With dnf
30+
^^^^^^^^
31+
32+
You can install ``python3-tarantool`` RPM package if you use Fedora 34-36.
33+
34+
Add the repository
35+
36+
.. code-block:: bash
37+
38+
$ curl -L https://tarantool.io/OtKysgx/release/2/installer.sh | bash
39+
40+
and then install the package
41+
42+
.. code-block:: bash
43+
44+
$ dnf install -y python3-tarantool
45+
2946
ZIP archive
3047
^^^^^^^^^^^
3148

docs/source/index.rst

+14
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ Install Tarantool Python connector with ``pip`` (`PyPI`_ page):
1414
1515
$ pip3 install tarantool
1616
17+
Otherwise, you can install ``python3-tarantool`` RPM package if you use Fedora 34-36.
18+
19+
Add the repository
20+
21+
.. code-block:: bash
22+
23+
$ curl -L https://tarantool.io/OtKysgx/release/2/installer.sh | bash
24+
25+
and then install the package
26+
27+
.. code-block:: bash
28+
29+
$ dnf install -y python3-tarantool
30+
1731
Source code is available on `GitHub`_.
1832

1933
Documentation

0 commit comments

Comments
 (0)