-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpy3-cassandra-medusa-0.17.1-r2.yaml
85 lines (63 loc) · 2.25 KB
/
py3-cassandra-medusa-0.17.1-r2.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package:
name: py3-cassandra-medusa-0.17.1-r2
version: 0.17.1
epoch: 2
description: Apache Cassandra backup and restore tool
copyright:
- license: Apache-2.0
dependencies:
runtime:
- python3
environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- py3.11-installer
- py3.11-pip
- python-3.11
- python-3.11-dev
- wolfi-base
pipeline:
- uses: git-checkout
with:
repository: https://github.com/thelastpickle/cassandra-medusa
tag: v${{package.version}}
expected-commit: 4a34c29ea09010420a7139336a2758a7c765e343
- name: Python Build
runs: 'pip install wheel
python setup.py bdist_wheel
'
- runs: '# Setup the virtualenv
python -m venv .venv --system-site-packages
# Bump pip to patch a CVE
.venv/bin/pip install --upgrade pip==23.3.2 setuptools==65.5.1
'
- runs: '.venv/bin/pip install -I --no-compile dist/*.whl
'
- runs: 'mkdir -p ${{targets.destdir}}/usr/share/py3-cassandra-medusa
mv .venv ${{targets.destdir}}/usr/share/py3-cassandra-medusa/
# edit the venv paths
sed -i "s|/home/build|/usr/share/py3-cassandra-medusa|g" ${{targets.destdir}}/usr/share/py3-cassandra-medusa/.venv/bin/*
# allow site-packages
sed -i "s|include-system-site-packages = false|include-system-site-packages = true|g" ${{targets.destdir}}/usr/share/py3-cassandra-medusa/.venv/pyvenv.cfg
'
- runs: 'mkdir -p ${{targets.destdir}}/usr/bin
ln -s /usr/share/py3-cassandra-medusa/.venv/bin/py3-cassandra-medusa ${{targets.destdir}}/usr/bin/py3-cassandra-medusa
'
- uses: strip
subpackages:
- name: ${{package.name}}-compat
description: Compatibility package to place binaries and docker entrypoints in the location expected by upstream helm charts
pipeline:
- runs: 'mkdir -p "${{targets.subpkgdir}}/home/cassandra/"
ln -sf /usr/bin/py3-cassandra-medusa ${{targets.subpkgdir}}/home/cassandra/medusa
cp k8s/docker-entrypoint.sh ${{targets.subpkgdir}}/home/cassandra/
chmod +x ${{targets.subpkgdir}}/home/cassandra/docker-entrypoint.sh
'
update:
enabled: true
github:
identifier: thelastpickle/cassandra-medusa
strip-prefix: v