Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 31 additions & 12 deletions .github/buildomat/jobs/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
#: target = "helios-latest"
#: rust_toolchain = "1.66.1"
#: output_rules = [
#: "=/work/package.tar.gz",
#: "=/work/global-zone-packages.tar.gz",
#: "=/work/zones/*.tar.gz",
#: ]
#:
#: [[publish]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See: https://github.com/oxidecomputer/buildomat#configuration , under publish specifically

I think this'll be necessary for the helios repo to be able to "pick up these output artifacts" by a particular commit of Omicron

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm doing that work in oxidecomputer/helios#56

#: series = "image"
#: name = "global-zone-packages"
#: from_output = "/out/global-zone-packages.tar.gz"

set -o errexit
set -o pipefail
Expand All @@ -17,18 +21,33 @@ set -o xtrace
cargo --version
rustc --version

# Build
ptime -m ./tools/install_builder_prerequisites.sh -yp
ptime -m ./tools/create_self_signed_cert.sh -yp

ptime -m cargo run --locked --release --bin omicron-package -- package

files=(
out/*.tar
package-manifest.toml
smf/sled-agent/config.toml
target/release/omicron-package
tools/create_virtual_hardware.sh
)
ptime -m tar cvzf /work/package.tar.gz "${files[@]}"
# Assemble global zone files in a temporary directory.
tmp=$(mktemp -d)
mkdir -p "${tmp}/sled-agent"
tar -xvzf out/omicron-sled-agent.tar -C "${tmp}/sled-agent"
mkdir -p "${tmp}/maghemite"
tar -xvzf out/maghemite.tar -C "${tmp}/maghemite"

# Load those global zone files into a tarball that's ready to be exported.
mkdir -p /work
ptime -m tar cvzf /work/global-zone-packages.tar.gz -C "${tmp}" .

# Assemble Zone Images into their respective output locations.
mkdir -p /work/zones
mv out/*.tar.gz /work/zones/
zones=(
out/clickhouse.tar.gz
out/cockroachdb.tar.gz
out/crucible-pantry.tar.gz
out/crucible.tar.gz
out/external-dns.tar.gz
out/internal-dns.tar.gz
out/omicron-nexus.tar.gz
out/oximeter-collector.tar.gz
out/propolis-server.tar.gz
out/switch-asic.tar.gz
)
mv "${zones[@]}" /work/zones/