-
Notifications
You must be signed in to change notification settings - Fork 120
/
pkg.yaml
63 lines (55 loc) · 2.4 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: stargz-snapshotter
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
steps:
- sources:
- url: https://github.com/containerd/stargz-snapshotter/archive/refs/tags/{{ .STARGZ_SNAPSHOTTER_VERSION }}.tar.gz
destination: stargz-snapshotter.tar.gz
sha256: 9b41555baf7d4f9cfc2d83caff2cdc2ab4331ee288acdc6ec1e3d40c850b970b
sha512: 5a5f8cecda31d4530f41e74b7e30f99215b3bd33f47d515c381529a619dfd74b1af521b49e41216aca9169135a0cb3050adc7c6c0d613f6488b0bd346d3e75cf
env:
GOPATH: /go
cachePaths:
- /.cache/go-build
- /go/pkg
prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
- |
mkdir -p ${GOPATH}/src/github.com/containerd/stargz-snapshotter
tar -xzf stargz-snapshotter.tar.gz --strip-components=1 -C ${GOPATH}/src/github.com/containerd/stargz-snapshotter
build:
- |
export PATH=${PATH}:${TOOLCHAIN}/go/bin
cd ${GOPATH}/src/github.com/containerd/stargz-snapshotter
make containerd-stargz-grpc
make ctr-remote
install:
- |
mkdir -p /rootfs/usr/local/bin
mkdir -p /rootfs/usr/local/lib/containers/stargz-snapshotter
cd ${GOPATH}/src/github.com/containerd/stargz-snapshotter
cp ./out/containerd-stargz-grpc /rootfs/usr/local/lib/containers/stargz-snapshotter/containerd-stargz-grpc
chmod +x /rootfs/usr/local/lib/containers/stargz-snapshotter/containerd-stargz-grpc
cp ./out/ctr-remote /rootfs/usr/local/lib/containers/stargz-snapshotter/ctr-remote
chmod +x /rootfs/usr/local/lib/containers/stargz-snapshotter/ctr-remote
- |
mkdir -p /rootfs/etc/cri/conf.d
cp /pkg/stargz-snapshotter.part /rootfs/etc/cri/conf.d/stargz-snapshotter.part
mkdir -p /rootfs/usr/local/etc/containerd-stargz-grpc
cp /pkg/config.toml /rootfs/usr/local/etc/containerd-stargz-grpc/config.toml
mkdir -p /rootfs/usr/local/etc/containers
cp /pkg/stargz-snapshotter.yaml /rootfs/usr/local/etc/containers/
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: /