Skip to content

Commit

Permalink
Merge branch 'main' into alan/omdb-phys
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Hanson committed Oct 25, 2023
2 parents ccf5523 + 6f4923e commit ac04038
Show file tree
Hide file tree
Showing 41 changed files with 1,391 additions and 428 deletions.
48 changes: 42 additions & 6 deletions .github/buildomat/jobs/host-image.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/bin/bash
#:
#: name = "helios / build OS image"
#: name = "helios / build OS images"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "1.72.1"
#: output_rules = [
#: "=/work/helios/image/output/os.tar.gz",
#: "=/work/helios/upload/os-host.tar.gz",
#: "=/work/helios/upload/os-trampoline.tar.gz",
#: ]
#: access_repos = [
#: "oxidecomputer/amd-apcb",
Expand Down Expand Up @@ -44,14 +45,49 @@ TOP=$PWD

source "$TOP/tools/include/force-git-over-https.sh"

# Checkout helios at a pinned commit into /work/helios
git clone https://github.com/oxidecomputer/helios.git /work/helios
cd /work/helios
# Check out helios into /work/helios
HELIOSDIR=/work/helios
git clone https://github.com/oxidecomputer/helios.git "$HELIOSDIR"
cd "$HELIOSDIR"
# Record the branch and commit in the output
git status --branch --porcelain=2
# Setting BUILD_OS to no makes setup skip repositories we don't need for
# building the OS itself (we are just building an image from already built OS).
BUILD_OS=no gmake setup

# Commands that "helios-build" would ask us to run (either explicitly or
# implicitly, to avoid an error).
rc=0
pfexec pkg install -q /system/zones/brand/omicron1/tools || rc=$?
case $rc in
# `man pkg` notes that exit code 4 means no changes were made because
# there is nothing to do; that's fine. Any other exit code is an error.
0 | 4) ;;
*) exit $rc ;;
esac

pfexec zfs create -p "rpool/images/$USER"


# TODO: Consider importing zones here too?

cd "$TOP"
OUTPUTDIR="$HELIOSDIR/upload"
mkdir "$OUTPUTDIR"

banner OS
./tools/build-host-image.sh -B \
-S /input/package/work/zones/switch-asic.tar.gz \
/work/helios \
"$HELIOSDIR" \
/input/package/work/global-zone-packages.tar.gz

mv "$HELIOSDIR/image/output/os.tar.gz" "$OUTPUTDIR/os-host.tar.gz"

banner Trampoline

./tools/build-host-image.sh -R \
"$HELIOSDIR" \
/input/package/work/trampoline-global-zone-packages.tar.gz

mv "$HELIOSDIR/image/output/os.tar.gz" "$OUTPUTDIR/os-trampoline.tar.gz"

2 changes: 1 addition & 1 deletion .github/buildomat/jobs/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ rustc --version
# trampoline global zone images.
#
COMMIT=$(git rev-parse HEAD)
VERSION="1.0.2-0.ci+git${COMMIT:0:11}"
VERSION="1.0.3-0.ci+git${COMMIT:0:11}"
echo "$VERSION" >/work/version.txt

ptime -m ./tools/install_builder_prerequisites.sh -yp
Expand Down
54 changes: 0 additions & 54 deletions .github/buildomat/jobs/trampoline-image.sh

This file was deleted.

7 changes: 2 additions & 5 deletions .github/buildomat/jobs/tuf-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
#: job = "helios / package"
#:
#: [dependencies.host]
#: job = "helios / build OS image"
#:
#: [dependencies.trampoline]
#: job = "helios / build trampoline OS image"
#: job = "helios / build OS images"
#:
#: [[publish]]
#: series = "rot-all"
Expand Down Expand Up @@ -139,7 +136,7 @@ name = "$kind"
version = "$VERSION"
[artifact.$kind.source]
kind = "file"
path = "/input/$kind/work/helios/image/output/os.tar.gz"
path = "/input/host/work/helios/upload/os-$kind.tar.gz"
EOF
done

Expand Down
2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"local>oxidecomputer/renovate-config",
"local>oxidecomputer/renovate-config//rust/autocreate",
"local>oxidecomputer/renovate-config:post-upgrade",
"helpers:pinGitHubActionDigests"
"local>oxidecomputer/renovate-config//actions/pin"
]
}
2 changes: 1 addition & 1 deletion .github/workflows/check-opte-ver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
check-opte-ver:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Install jq
run: sudo apt-get install -y jq
- name: Install toml-cli
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-workspace-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
check-workspace-deps:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Check Workspace Dependencies
run: cargo xtask check-workspace-deps
4 changes: 2 additions & 2 deletions .github/workflows/hakari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1
with:
toolchain: stable
- name: Install cargo-hakari
uses: taiki-e/install-action@e659bf85ee986e37e35cc1c53bfeebe044d8133e # v2
uses: taiki-e/install-action@ac89944b5b150d78567ab6c02badfbe48b0b55aa # v2
with:
tool: cargo-hakari
- name: Check workspace-hack Cargo.toml is up-to-date
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
check-style:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Report cargo version
run: cargo --version
- name: Report rustfmt version
Expand All @@ -27,7 +27,7 @@ jobs:
# This repo is unstable and unnecessary: https://github.com/microsoft/linux-package-repositories/issues/34
- name: Disable packages.microsoft.com repo
run: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # v2.2.1
if: ${{ github.ref != 'refs/heads/main' }}
- name: Report cargo version
Expand All @@ -53,7 +53,7 @@ jobs:
# This repo is unstable and unnecessary: https://github.com/microsoft/linux-package-repositories/issues/34
- name: Disable packages.microsoft.com repo
run: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # v2.2.1
if: ${{ github.ref != 'refs/heads/main' }}
- name: Report cargo version
Expand All @@ -79,7 +79,7 @@ jobs:
# This repo is unstable and unnecessary: https://github.com/microsoft/linux-package-repositories/issues/34
- name: Disable packages.microsoft.com repo
run: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # v2.2.1
if: ${{ github.ref != 'refs/heads/main' }}
- name: Report cargo version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-dendrite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:

# Checkout both the target and integration branches
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
token: ${{ inputs.reflector_access_token }}
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-maghemite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:

# Checkout both the target and integration branches
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
token: ${{ inputs.reflector_access_token }}
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-openapi-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '18'
Expand Down
Loading

0 comments on commit ac04038

Please sign in to comment.