-
Notifications
You must be signed in to change notification settings - Fork 12
/
charmcraft.yaml
55 lines (54 loc) · 1.66 KB
/
charmcraft.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
type: charm
bases:
- build-on:
- name: "ubuntu"
channel: "20.04"
run-on:
- name: "ubuntu"
channel: "20.04"
- build-on:
- name: "ubuntu"
channel: "22.04"
run-on:
- name: "ubuntu"
channel: "22.04"
parts:
charm:
build-packages:
- "git"
# rustc and cargo required to build pydantic
- rustc
- cargo
charm-binary-python-packages:
# Install PyYAML from binary and avoid building it from sources. This way, we can use PyYAML with C-optimized lib.
# With the C-optimized lib, serialization in ops is 20x faster.
- PyYAML
- cryptography
nrpe-exporter:
plugin: dump
source: .
build-packages:
- curl
override-pull: |
if [ $CRAFT_ARCH_BUILD_FOR == "amd64" ]; then
URI=https://github.com/canonical/nrpe_exporter/releases/latest/download/nrpe_exporter-amd64
curl -L $URI -o nrpe_exporter-amd64
elif [ $CRAFT_ARCH_BUILD_FOR == "arm64" ] || [ $CRAFT_ARCH_BUILD_FOR == "aarch64" ]; then
URI=https://github.com/canonical/nrpe_exporter/releases/latest/download/nrpe_exporter-arm64
curl -L $URI -o nrpe_exporter-aarch64
fi
vector:
plugin: dump
source: .
build-packages:
- curl
- tar
override-pull: |
VERSION=0.36.0
if [ $CRAFT_ARCH_BUILD_FOR == "amd64" ]; then
ARCH=x86_64-unknown-linux-musl
elif [ $CRAFT_ARCH_BUILD_FOR == "arm64" ]; then
ARCH=aarch64-unknown-linux-musl
fi
VECTOR_URI="https://packages.timber.io/vector/${VERSION}/vector-${VERSION}-${ARCH}.tar.gz"
curl -sSfL ${VECTOR_URI} | tar xzf - -C . --strip-components=3 ./vector-${ARCH}/bin/vector