-
Notifications
You must be signed in to change notification settings - Fork 123
/
pkg.yaml
40 lines (38 loc) · 1.95 KB
/
pkg.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
name: wasmedge
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
steps:
- sources:
# {{ if eq .ARCH "aarch64" }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
- url: https://github.com/containerd/runwasi/releases/download/containerd-shim-wasmedge/{{ .WASMEDGE_VERSION }}/containerd-shim-wasmedge-aarch64.tar.gz
destination: containerd-shim-wasmedge.tar.gz
sha256: 294928f85d531de639158a0d4558bfacfa4fa242ac476c32e6b677dbf08512d0
sha512: 6e7e206102c9ff75ad0cc023d556d1c58b035c18856a7547c398d61d80feef501c42140e9123790ed243e201699dc287e578f1545a2110ce12a2aea93584ff89
# {{ else }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
- url: https://github.com/containerd/runwasi/releases/download/containerd-shim-wasmedge/{{ .WASMEDGE_VERSION }}/containerd-shim-wasmedge-x86_64.tar.gz
destination: containerd-shim-wasmedge.tar.gz
sha256: e3cc12ebf485ad39743e8922770446e428fdb201b2c80b2ebc85bb6b2ac6b36f
sha512: 908cd3e72376a31dcb71d4eae13bc306bd320a218ec18ded6d31faede4732b978fb3ae96f760952aff90f21adb11557ab66be38d419a099dac028dea69101070
# {{ end }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
install:
- |
mkdir -p /rootfs/usr/local/bin
mkdir -p /rootfs/etc/cri/conf.d
cp /pkg/wasm.part /rootfs/etc/cri/conf.d/wasm.part
tar xf containerd-shim-wasmedge.tar.gz -C /rootfs/usr/local/bin
test:
- |
mkdir -p /extensions-validator-rootfs
cp -r /rootfs/ /extensions-validator-rootfs/rootfs
cp /pkg/manifest.yaml /extensions-validator-rootfs/manifest.yaml
/extensions-validator validate --rootfs=/extensions-validator-rootfs --pkg-name="${PKG_NAME}"
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /