forked from siderolabs/extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
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: 8ed092c7020b439985cad81653d76043aee9549319d47541529e240d3690dec9
sha512: 9fbf9822408725839bd75f56793e4b94ab136b96d9a86ee80b23a156bc5416d2ad5e485513523de93d4a192f8d294c43b94ce03e819e37ce3354c056cd98b24e
# {{ 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: 81d79fdbf3bff9433586222f5443a69ce6b690172f32cfc92ed3306125d5db15
sha512: 281e30a1183cb3197fb624b37b0b94abad3ccfe549b1f4fbf939bc461246712fe4b24cf2369deaa96be6397aa41f32d350540e19ff460da7fb3f96c4c01d11f1
# {{ 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: /