Skip to content

Commit fe71189

Browse files
committed
Add buildomat jobs for select images
It's useful to have some images that have gone through a `permslip sign`. Do so in a very limited fashion.
1 parent 7fcfe60 commit fe71189

23 files changed

+527
-0
lines changed

.github/buildomat/build-one.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
set -o errexit
4+
set -o pipefail
5+
set -o xtrace
6+
set -o nounset
7+
8+
name=$1
9+
toml=$2
10+
image=$3
11+
12+
cargo xtask dist $toml
13+
cp target/$name/dist/$image/build-$name-image-$image.zip /work/
14+
touch /work/this_is_not_signed.txt
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
#
3+
# The token authentication mechanism that affords us access to other private
4+
# repositories requires that we use HTTPS URLs for GitHub, rather than SSH.
5+
#
6+
override_urls=(
7+
'git://github.com/'
8+
9+
'ssh://github.com/'
10+
11+
'git+ssh://[email protected]/'
12+
)
13+
for (( i = 0; i < ${#override_urls[@]}; i++ )); do
14+
git config --add --global url.https://github.com/.insteadOf \
15+
"${override_urls[$i]}"
16+
done
17+
18+
#
19+
# Require that cargo use the git CLI instead of the built-in support. This
20+
# achieves two things: first, SSH URLs should be transformed on fetch without
21+
# requiring Cargo.toml rewriting, which is especially difficult in transitive
22+
# dependencies; second, Cargo does not seem willing on its own to look in
23+
# ~/.netrc and find the temporary token that buildomat generates for our job,
24+
# so we must use git which uses curl.
25+
#
26+
export CARGO_NET_GIT_FETCH_WITH_CLI=true
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build gimlet-c-lab"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh gimlet-c-lab app/gimlet/rev-c-lab.toml default

.github/buildomat/jobs/gimlet-c.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build gimlet-c"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh gimlet-c app/gimlet/rev-c.toml default
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build gimlet-d-lab"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh gimlet-d-lab app/gimlet/rev-d-lab.toml default

.github/buildomat/jobs/gimlet-d.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build gimlet-d"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh gimlet-d app/gimlet/rev-d.toml default
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build gimlet-e-lab"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh gimlet-e-lab app/gimlet/rev-e-lab.toml default

.github/buildomat/jobs/gimlet-e.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build gimlet-e"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh gimlet-e app/gimlet/rev-e.toml default
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build gimlet-f-lab"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh gimlet-f-lab app/gimlet/rev-f-lab.toml default

.github/buildomat/jobs/gimlet-f.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build gimlet-f"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh gimlet-f app/gimlet/rev-f.toml default

.github/buildomat/jobs/psc-b.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build psc-b"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh psc-b app/psc/rev-b.toml default

.github/buildomat/jobs/psc-c.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build psc-c"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh psc-c app/psc/rev-c.toml default

.github/buildomat/jobs/rot.sh

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build rot"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: ]
10+
#: access_repos = [
11+
#: "oxidecomputer/permission-slip",
12+
#: ]
13+
#:
14+
15+
set -o errexit
16+
set -o pipefail
17+
set -o xtrace
18+
19+
_cleanup () {
20+
kill $(jobs -p)
21+
}
22+
23+
trap _cleanup SIGINT SIGTERM EXIT
24+
25+
source .github/buildomat/force-git-over-https.sh
26+
source .github/buildomat/permslip-setup.sh
27+
28+
29+
cargo xtask dist app/oxide-rot-1/app-dev.toml
30+
$PERMSLIP_DIR/target/release/permslip --url=http://localhost:41340 \
31+
sign "UNTRUSTED bart" \
32+
target/oxide-rot-1-selfsigned/dist/a/build-oxide-rot-1-selfsigned-image-a.zip \
33+
--version 0.0.0-ci > /work/build-oxide-rot-1-selfsigned-image-a.zip
34+
35+
$PERMSLIP_DIR/target/release/permslip --url=http://localhost:41340 \
36+
sign "UNTRUSTED bart" \
37+
target/oxide-rot-1-selfsigned/dist/b/build-oxide-rot-1-selfsigned-image-b.zip \
38+
--version 0.0.0-ci > /work/build-oxide-rot-1-selfsigned-image-b.zip
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build sidecar-b-lab"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh sidecar-b-lab app/sidecar/rev-b-lab.toml default

.github/buildomat/jobs/sidecar-b.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build sidecar-b"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh sidecar-b app/sidecar/rev-b.toml default
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build sidecar-c-lab"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh sidecar-c-lab app/sidecar/rev-c-lab.toml default

.github/buildomat/jobs/sidecar-c.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build sidecar-c"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh sidecar-c app/sidecar/rev-c.toml default
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build sidecar-d-lab"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh sidecar-d-lab app/sidecar/rev-d-lab.toml default

.github/buildomat/jobs/sidecar-d.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#:
3+
#: name = "build sidecar-d"
4+
#: variety = "basic"
5+
#: target = "ubuntu-22.04"
6+
#: rust_toolchain = true
7+
#: output_rules = [
8+
#: "=/work/*.zip",
9+
#: "=/work/this_is_not_signed.txt",
10+
#: ]
11+
12+
set -o errexit
13+
set -o pipefail
14+
set -o xtrace
15+
16+
exec .github/buildomat/build-one.sh sidecar-d app/sidecar/rev-d.toml default

0 commit comments

Comments
 (0)