-
Notifications
You must be signed in to change notification settings - Fork 216
Expand file tree
/
Copy pathpkg.yaml
More file actions
62 lines (53 loc) · 2.16 KB
/
pkg.yaml
File metadata and controls
62 lines (53 loc) · 2.16 KB
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
name: gvisor
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
steps:
- sources:
# gvisor repo 'master' branch is Bazel-bazed, so we need to find matching commit in the "go" branch
# find the go-branch specific merge commit ("Merge release-... (automated)") which has the release-tagged commit as a parent
- url: https://github.com/google/gvisor/archive/9f3309e5b12177159bc961e560ecfc982d0a4a07.tar.gz
destination: gvisor.tar.gz
sha256: 4c271d688f9244b7079e78c86e23a5f21063cef76c5c7c7a8f261ff8e2f4b4fa
sha512: 04ddd8a834dfa2c46d34977be7ad07abf1ed7fbc70446dcbdb687c9e41258f2f3a744f7526e5cc693026d8a58143af11a8f4c2de572fa64496a62d3019d54a51
env:
GOPATH: /go
cachePaths:
- /.cache/go-build
- /go/pkg
prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
- |
mkdir -p ${GOPATH}/src/github.com/google/gvisor
tar -xzf gvisor.tar.gz --strip-components=1 -C ${GOPATH}/src/github.com/google/gvisor
build:
- |
export PATH=${PATH}:${TOOLCHAIN}/go/bin
cd ${GOPATH}/src/github.com/google/gvisor
mkdir ./bin
CGO_ENABLED=0 go build -o ./bin/runsc ./runsc
CGO_ENABLED=0 go build -o ./bin/containerd-shim-runsc-v1 ./shim
install:
- |
mkdir -p /rootfs/usr/local/bin
cd ${GOPATH}/src/github.com/google/gvisor
cp ./bin/runsc /rootfs/usr/local/bin/runsc
chmod +x /rootfs/usr/local/bin/runsc
cp ./bin/containerd-shim-runsc-v1 /rootfs/usr/local/bin/containerd-shim-runsc-v1
chmod +x /rootfs/usr/local/bin/containerd-shim-runsc-v1
- |
mkdir -p /rootfs/etc/cri/conf.d
cp /pkg/gvisor.part /pkg/runsc.toml /pkg/gvisor-kvm.part /pkg/runsc-kvm.toml /rootfs/etc/cri/conf.d/
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: /