-
Notifications
You must be signed in to change notification settings - Fork 132
/
Copy pathpkg.yaml
40 lines (38 loc) · 1.97 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: /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-linux-musl.tar.gz
destination: containerd-shim-wasmedge.tar.gz
sha256: d969b781531571ed7b2c5bc5e9ec22321e942567753892a9e042e6db882df944
sha512: 27a4e2af61f4893de468e38086e3cc3fef9d5b5aae193136e4a443ed1657e21f591455198bd402ca24a079fe92ea4d2c658d4d02093dedff0655ffdcf5484203
# {{ 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-linux-musl.tar.gz
destination: containerd-shim-wasmedge.tar.gz
sha256: 84388d24c87be93e1e32ef15ff776b9cb17a8bf57374c0faca0a994508347de3
sha512: 144a9d36b55a439700b09b96d25905c1c0ea3ebb4be95bbd71f541e34a07ff2ac4b0d5541e2bd45bb4ccc710f26b2f4b7e56067d9d484fb64986a574cbe21664
# {{ 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/10-wasm.part /rootfs/etc/cri/conf.d/10-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: /