forked from openebs/rawfile-localpv
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrockcraft.yaml
68 lines (64 loc) · 1.56 KB
/
rockcraft.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
# Metadata section
name: rawfile-localpv
summary: RawFilePV
description: Kubernetes LocalPVs on Steroids
version: "0.8.1"
license: Apache-2.0
base: bare
build-base: [email protected]
platforms:
amd64:
arm64:
services:
rawfile:
override: replace
command: python3 /app/rawfile.py [ csi-driver ]
startup: enabled
environment:
PYTHONUNBUFFERED: '1'
working-dir: '/app'
parts:
btrfsutil:
plugin: nil
build-packages:
- build-essential
- libbtrfsutil-dev
- python3
override-build: |-
pip wheel -w wheels/ "https://github.com/kdave/btrfs-progs/archive/refs/tags/v6.3.2.tar.gz#egg=btrfsutil&subdirectory=libbtrfsutil/python"
override-stage: |-
mkdir -p $CRAFT_STAGE/wheels/
rm -rf $CRAFT_STAGE/wheels/wheels.txt
find $CRAFT_PART_BUILD/wheels -name \*.whl -exec cp {} $CRAFT_STAGE/wheels/ \;
for wheel in $CRAFT_STAGE/wheels/*.whl; do
echo $wheel >> $CRAFT_STAGE/wheels/wheels.txt
done
rawfile-deps:
after: [btrfsutil]
plugin: python
source: .
build-environment:
- PIP_NO_CACHE_DIR: "1"
python-requirements:
- $CRAFT_STAGE/wheels/wheels.txt
- ./requirements.txt
stage-packages:
- e2fsprogs
- btrfs-progs
- libbtrfsutil1
- xfsprogs
- python3-venv
- dash
- mount
- coreutils
- util-linux
rawfile:
after: [rawfile-deps]
plugin: dump
source: .
organize:
csi: app/csi/
orchestrator: app/orchestrator
protos: app/protos
templates: app/templates
'*.py': app/