-
Notifications
You must be signed in to change notification settings - Fork 119
/
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: a9f633e795091fe43701dacfa08faa00912083e79544644966c4d46b9b4dd2fa
sha512: 84f901f0410158363ae3ae74dccabcb5f31eb03491206a1cbf486d203e63445a9b0f31cb3dd2b342d4694bfe764c7e92aaad2884d32bed14af95218c0549fb59
# {{ 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: 4f9ff48e805a66a86b45a6c72c0052c1b877dbd442764302a22a9608c2e60bd1
sha512: 2bfcbb1b9a1ea1039f9d19274170f64809ab2f851a4f044f000ba552dcb659fd54310ce075e1d02c30eee82c81121c0d4d4c8a3c91db119bde78adfa5f52469b
# {{ 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: /