32
|
1
|
#!/usr/bin/env bash |
|
2
|
|
|
3
|
# these should be spawned as needed by a ci-leader box within a |
|
4
|
# dedicated pod named 'ci'. |
33
|
5
|
|
|
6
|
id=$(buildah from alpine-base) |
34
|
7
|
buildah copy $id etc/skel /etc/skel |
33
|
8
|
buildah run $id adduser alik -D |
34
|
9
|
buildah run $id adduser demon -D -k /etc/skel |
42
|
10
|
buildah run $id apk add build-base zstd-dev sbcl curl make git linux-headers cargo openssl perl |
33
|
11
|
buildah config --workingdir /home/demon $id |
|
12
|
buildah config -l=demo $id |
|
13
|
buildah run --net host $id hg clone https://vc.compiler.company/comp/core |
|
14
|
buildah run --net host $id hg clone https://vc.compiler.company/comp/infra |
34
|
15
|
buildah run --net host $id sh -c 'cd infra && make rocksdb-install' |
33
|
16
|
buildah run --net host $id sh -c 'cd infra && make sbcl-install' |
34
|
17
|
buildah run --net host $id sh -c 'cd infra && make ts-langs' |
|
18
|
buildah run --net host $id sh -c 'cd infra && make dist/fasl' |
|
19
|
buildah run --net host $id sh -c 'mv infra/dist/fasl/* /usr/local/lib/sbcl/' |
|
20
|
buildah run --net host $id sh -c './infra/scripts/install-cargo-tools.sh' |
|
21
|
buildah run --net host $id sh -c 'cd infra && make clean' |
|
22
|
buildah config --entrypoint '["sbcl", "--core", "/usr/local/lib/sbcl/prelude.fasl"]' $id |
33
|
23
|
buildah commit $id ci-worker |