-
Notifications
You must be signed in to change notification settings - Fork 123
/
pkg.yaml
40 lines (39 loc) · 1.92 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: spin
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/spinkube/containerd-shim-spin/releases/download/{{ .SPIN_VERSION }}/containerd-shim-spin-v2-linux-aarch64.tar.gz
destination: containerd-shim-spin.tar.gz
sha256: 51f740cfb93e71311685b7f4e9086df06ec6a821c6dbeab2306af268c4a6e233
sha512: fbaa3179e54ea60d0d385cf107af4a831ee18819089e4b70fa2366d890dd3e060015e159ba778d523569732fe3b4d5149dbd5a6ae1a64ad137efdfffcb0e7d82
# {{ else }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
- url: https://github.com/spinkube/containerd-shim-spin/releases/download/{{ .SPIN_VERSION }}/containerd-shim-spin-v2-linux-x86_64.tar.gz
destination: containerd-shim-spin.tar.gz
sha256: 4920d4f3db3c6709344272820e1782700d87791511721ef5dfcb70352391d40d
sha512: 018f0ffcf80fcfd6c9fe8b6035211c164dbabc66645a1f5f523793b693a630df0beeb87de5209564510b8d10921d2190e6cb8b29595f041f426edf7bcd4ff742
# {{ 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
tar xf containerd-shim-spin.tar.gz -C /rootfs/usr/local/bin
- |
mkdir -p /rootfs/etc/cri/conf.d
cp /pkg/spin.part /rootfs/etc/cri/conf.d/spin.part
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: /