[M] Change in fuchsia/fuchsia[main]: [starnix] Creates Docker container build script for Starnix tests.

0 views
Skip to first unread message

'Laura Peskin (Gerrit)' via owners-override

unread,
Dec 16, 2025, 2:30:10 PM (2 days ago) Dec 16
to Owners Override
Attention needed from Adam Perry, Briana Berger and Owners Override

Briana Berger has uploaded the change for review

Laura Peskin would like Owners Override to review this change authored by Briana Berger.

Commit message

[starnix] Creates Docker container build script for Starnix tests.
Bug: 427767342
Change-Id: Ie5df3f02435633b369d6abe6e645706cf14ef5d3

Change diff

diff --git a/scripts/docker/OWNERS b/scripts/docker/OWNERS
new file mode 100644
index 0000000..895af78
--- /dev/null
+++ b/scripts/docker/OWNERS
@@ -0,0 +1,2 @@
+briana...@google.com
+include /src/starnix/OWNERS
diff --git a/scripts/docker/build_starnix_alpine_container.sh b/scripts/docker/build_starnix_alpine_container.sh
new file mode 100644
index 0000000..3eeca70
--- /dev/null
+++ b/scripts/docker/build_starnix_alpine_container.sh
@@ -0,0 +1,112 @@
+#!/bin/bash
+# Copyright 2025 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This code is utilized by infra's run_script.py to automatically build and upload these
+# containers to CIPD as per b/427767342.
+set -e
+
+# If specified, infra uses this to upload the packages created here.
+CIPD_YAML_MANIFEST=""
+ARCHITECTURES="amd64 arm64"
+
+while [[ $# -gt 0 ]]; do
+ case "$1" in
+ --cipd-yaml-manifest)
+ CIPD_YAML_MANIFEST="$2"
+ echo "Creating cipd YAML manifest at: ${CIPD_YAML_MANIFEST}"
+ shift
+ shift
+ ;;
+ --architectures)
+ ARCHITECTURES="$2"
+ shift
+ shift
+ ;;
+ *)
+ echo "Unrecognized argument: $1"
+ exit 1
+ ;;
+ esac
+done
+
+# Move to the directory of the script to find Dockerfile
+SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
+
+FUCHSIA_ROOT=$(git rev-parse --show-toplevel)
+if [ -z "${FUCHSIA_ROOT}" ]; then
+ echo "Could not find fuchsia root directory. Are you in a git repository?"
+ exit 1
+fi
+
+# Dockerfile is expected to be at src/starnix/containers/alpine/Dockerfile
+DOCKERFILE_DIR="${FUCHSIA_ROOT}/src/starnix/containers/alpine"
+
+echo "Building docker images for alpine..."
+for arch in ${ARCHITECTURES}; do
+ echo "Building for ${arch}..."
+ docker buildx build --platform "linux/${arch}" --load -t "alpine-${arch}" "${DOCKERFILE_DIR}"
+done
+
+
+OUT_DIR="${FUCHSIA_ROOT}/out/alpine_cipd"
+rm -rf "${OUT_DIR}"
+mkdir -p "${OUT_DIR}"
+
+echo "Saving docker images..."
+for arch in ${ARCHITECTURES}; do
+ arch_dir="${OUT_DIR}/${arch}"
+ mkdir -p "${arch_dir}"
+ docker save -o "${arch_dir}/alpine.tar" "alpine-${arch}:latest"
+done
+
+GIT_REV=$(git -C "${FUCHSIA_ROOT}" rev-parse HEAD)
+GIT_REPO=$(git -C "${FUCHSIA_ROOT}" config --get remote.origin.url)
+
+CIPD_CLIENT="cipd"
+
+function create_cipd_yaml() {
+ local arch=$1
+ local content_dir=$2
+ local cipd_package_name="fuchsia/starnix/alpine-image-${arch}"
+ local cipd_yaml_file="${OUT_DIR}/cipd-${arch}.yaml"
+ local generated_cipd_file="${OUT_DIR}/alpine-${arch}.cipd"
+
+ echo "Creating ${arch} package..."
+
+ tee <<EOF > "${cipd_yaml_file}"
+package: ${cipd_package_name}
+install_mode: copy
+data:
+ - file: alpine.tar
+EOF
+}
+
+for arch in ${ARCHITECTURES}; do
+ create_cipd_yaml "${arch}" "${OUT_DIR}/${arch}"
+done
+
+if [[ -n "$CIPD_YAML_MANIFEST" ]]; then
+ # The output file is a JSON file that contains a list of YAML files.
+ # It is consumed by the run_script recipe.
+ echo "[" > "${CIPD_YAML_MANIFEST}"
+ first=true
+ for arch in ${ARCHITECTURES}; do
+ if [ "$first" = true ]; then
+ first=false
+ else
+ echo "," >> "${CIPD_YAML_MANIFEST}"
+ fi
+ tee -a <<EOF >> "${CIPD_YAML_MANIFEST}"
+ {
+ "path": "${OUT_DIR}/cipd-${arch}.yaml",
+ "tags": {
+ "git_repository": "${GIT_REPO}",
+ "git_revision": "${GIT_REV}"
+ }
+ }
+EOF
+ done
+ echo "]" >> "${CIPD_YAML_MANIFEST}"
+fi

Change information

Files:
  • A scripts/docker/OWNERS
  • A scripts/docker/build_starnix_alpine_container.sh
Change size: M
Delta: 2 files changed, 114 insertions(+), 0 deletions(-)
Open in Gerrit

Related details

Attention is currently required from:
  • Adam Perry
  • Briana Berger
  • Owners Override
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ie5df3f02435633b369d6abe6e645706cf14ef5d3
Gerrit-Change-Number: 1420204
Gerrit-PatchSet: 10
Gerrit-Owner: Briana Berger <briana...@google.com>
Gerrit-Reviewer: Briana Berger <briana...@google.com>
Gerrit-Reviewer: Kevin Lindkvist <lind...@google.com>
Gerrit-Reviewer: Laura Peskin <pe...@google.com>
Gerrit-Reviewer: Oliver Newman <oliver...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-CC: Adam Perry <adam...@google.com>
Gerrit-CC: Android Build Huckle Nudge <android-build...@prod.google.com>
Gerrit-Attention: Adam Perry <adam...@google.com>
Gerrit-Attention: Briana Berger <briana...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/e24f58ca99f5ee99f09f58dad8b2b05304b2d761-HTML%40fuchsia-review.googlesource.com.
unsatisfied_requirement
satisfied_requirement
open
diffy

'Laura Peskin (Gerrit)' via owners-override

unread,
Dec 16, 2025, 2:30:13 PM (2 days ago) Dec 16
to Briana Berger, Owners Override, GI Try Builder, CQ Bot, Adam Perry, Kevin Lindkvist, Android Build Huckle Nudge, Oliver Newman
Attention needed from Adam Perry, Briana Berger and Owners Override

Laura Peskin voted and added 1 comment

Votes added by Laura Peskin

Code-Review+2

1 comment

Patchset-level comments
File-level comment, Patchset 10 (Latest):
Laura Peskin . resolved

Adding owners-override based on the directions in //scripts/README.md.

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Perry
  • Briana Berger
  • Owners Override
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ie5df3f02435633b369d6abe6e645706cf14ef5d3
Gerrit-Change-Number: 1420204
Gerrit-PatchSet: 10
Gerrit-Owner: Briana Berger <briana...@google.com>
Gerrit-Reviewer: Briana Berger <briana...@google.com>
Gerrit-Reviewer: Kevin Lindkvist <lind...@google.com>
Gerrit-Reviewer: Laura Peskin <pe...@google.com>
Gerrit-Reviewer: Oliver Newman <oliver...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-CC: Adam Perry <adam...@google.com>
Gerrit-CC: Android Build Huckle Nudge <android-build...@prod.google.com>
Gerrit-Attention: Adam Perry <adam...@google.com>
Gerrit-Attention: Briana Berger <briana...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Comment-Date: Tue, 16 Dec 2025 19:30:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/e24f58ca99f5ee99f09f58dad8b2b05304b2d761-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
unsatisfied_requirement
satisfied_requirement
open
diffy

'Adam Barth (Gerrit)' via owners-override

unread,
Dec 16, 2025, 3:39:49 PM (2 days ago) Dec 16
to Briana Berger, Owners Override, GI Try Builder, CQ Bot, Adam Perry, Kevin Lindkvist, Laura Peskin, Android Build Huckle Nudge, Oliver Newman
Attention needed from Adam Perry, Briana Berger and Owners Override

Adam Barth voted Owners-Override+1

Owners-Override+1
Open in Gerrit

Related details

Attention is currently required from:
  • Adam Perry
  • Briana Berger
  • Owners Override
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ie5df3f02435633b369d6abe6e645706cf14ef5d3
Gerrit-Change-Number: 1420204
Gerrit-PatchSet: 10
Gerrit-Owner: Briana Berger <briana...@google.com>
Gerrit-Reviewer: Adam Barth <aba...@google.com>
Gerrit-Reviewer: Briana Berger <briana...@google.com>
Gerrit-Reviewer: Kevin Lindkvist <lind...@google.com>
Gerrit-Reviewer: Laura Peskin <pe...@google.com>
Gerrit-Reviewer: Oliver Newman <oliver...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-CC: Adam Perry <adam...@google.com>
Gerrit-CC: Android Build Huckle Nudge <android-build...@prod.google.com>
Gerrit-Attention: Adam Perry <adam...@google.com>
Gerrit-Attention: Briana Berger <briana...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Comment-Date: Tue, 16 Dec 2025 20:39:42 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/b8087e0444c6d7f46ba3984be7c0bd35edb72088-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'Briana Berger (Gerrit)' via owners-override

unread,
Dec 16, 2025, 4:19:21 PM (2 days ago) Dec 16
to Adam Barth, Owners Override, GI Try Builder, CQ Bot, Adam Perry, Kevin Lindkvist, Laura Peskin, Android Build Huckle Nudge, Oliver Newman
Attention needed from Adam Perry and Owners Override

Briana Berger voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention is currently required from:
  • Adam Perry
  • Owners Override
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Comment-Date: Tue, 16 Dec 2025 21:19:13 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/b0ee1616747797d4759071081b316e2c149060d3-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'CQ Bot (Gerrit)' via owners-override

unread,
Dec 16, 2025, 4:19:40 PM (2 days ago) Dec 16
to Briana Berger, Adam Barth, Owners Override, GI Try Builder, Adam Perry, Kevin Lindkvist, Laura Peskin, Android Build Huckle Nudge, Oliver Newman

CQ Bot submitted the change

Change information

Commit message:
[starnix] Creates Docker container build script for Starnix tests.
Bug: 427767342
Change-Id: Ie5df3f02435633b369d6abe6e645706cf14ef5d3
Reviewed-by: Kevin Lindkvist <lind...@google.com>
Commit-Queue: Briana Berger <briana...@google.com>
Reviewed-by: Laura Peskin <pe...@google.com>
Owners-Override: Adam Barth <aba...@google.com>
Reviewed-by: Oliver Newman <oliver...@google.com>
Files:
  • A scripts/docker/OWNERS
  • A scripts/docker/build_starnix_alpine_container.sh
Change size: M
Delta: 2 files changed, 114 insertions(+), 0 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Kevin Lindkvist, +2 by Laura Peskin, +2 by Oliver Newman, +0 by Briana Berger
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ie5df3f02435633b369d6abe6e645706cf14ef5d3
Gerrit-Change-Number: 1420204
Gerrit-PatchSet: 11
Gerrit-Owner: Briana Berger <briana...@google.com>
Gerrit-Reviewer: Adam Barth <aba...@google.com>
Gerrit-Reviewer: Briana Berger <briana...@google.com>
Gerrit-Reviewer: Kevin Lindkvist <lind...@google.com>
Gerrit-Reviewer: Laura Peskin <pe...@google.com>
Gerrit-Reviewer: Oliver Newman <oliver...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-CC: Adam Perry <adam...@google.com>
Gerrit-CC: Android Build Huckle Nudge <android-build...@prod.google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/524655d27ca5cb601c99084fa993cd53d06ef5d8-HTML%40fuchsia-review.googlesource.com.
open
diffy
satisfied_requirement

'GI Roller (Gerrit)' via owners-override

unread,
Dec 16, 2025, 4:22:40 PM (2 days ago) Dec 16
to Briana Berger, CQ Bot, Adam Barth, Owners Override, GI Try Builder, Adam Perry, Kevin Lindkvist, Laura Peskin, Android Build Huckle Nudge, Oliver Newman

Message from GI Roller

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ie5df3f02435633b369d6abe6e645706cf14ef5d3
Gerrit-Change-Number: 1420204
Gerrit-PatchSet: 11
Gerrit-Owner: Briana Berger <briana...@google.com>
Gerrit-Reviewer: Adam Barth <aba...@google.com>
Gerrit-Reviewer: Briana Berger <briana...@google.com>
Gerrit-Reviewer: Kevin Lindkvist <lind...@google.com>
Gerrit-Reviewer: Laura Peskin <pe...@google.com>
Gerrit-Reviewer: Oliver Newman <oliver...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-CC: Adam Perry <adam...@google.com>
Gerrit-CC: Android Build Huckle Nudge <android-build...@prod.google.com>
Gerrit-Comment-Date: Tue, 16 Dec 2025 21:22:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/a91123b2c2602ae40d351b17d49ba29c650d66b7-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages