From 27da3c0bbfa80d55c4ce9fb2adce3521aef6d381 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Tue, 24 Feb 2026 18:18:22 +0000 Subject: [PATCH] Add fipsctl to Docker test harness builds Include fipsctl binary in both static and chaos test harness Dockerfiles, build scripts, and gitignores alongside the existing fips binary. --- testing/chaos/.gitignore | 1 + testing/chaos/Dockerfile | 4 ++-- testing/chaos/scripts/build.sh | 8 +++++--- testing/static/.gitignore | 1 + testing/static/Dockerfile | 4 ++-- testing/static/scripts/build.sh | 10 ++++++---- 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/testing/chaos/.gitignore b/testing/chaos/.gitignore index 148f94d..8c71f36 100644 --- a/testing/chaos/.gitignore +++ b/testing/chaos/.gitignore @@ -1,4 +1,5 @@ fips +fipsctl generated-configs __pycache__ sim-results diff --git a/testing/chaos/Dockerfile b/testing/chaos/Dockerfile index 7be38c6..27ca15a 100644 --- a/testing/chaos/Dockerfile +++ b/testing/chaos/Dockerfile @@ -24,8 +24,8 @@ RUN printf '%s\n' \ 'no-resolv' \ >> /etc/dnsmasq.conf -COPY fips /usr/local/bin/ -RUN chmod +x /usr/local/bin/fips +COPY fips fipsctl /usr/local/bin/ +RUN chmod +x /usr/local/bin/fips /usr/local/bin/fipsctl # Static web page served via Python HTTP server RUN printf 'Fuck IPs!\n' > /root/index.html diff --git a/testing/chaos/scripts/build.sh b/testing/chaos/scripts/build.sh index 95b309f..77de126 100755 --- a/testing/chaos/scripts/build.sh +++ b/testing/chaos/scripts/build.sh @@ -35,14 +35,16 @@ if [ "$UNAME_S" = "Darwin" ]; then echo "Building FIPS for Linux (release) using cargo-zigbuild..." cargo zigbuild --release --target "$CARGO_TARGET" --manifest-path="$PROJECT_ROOT/Cargo.toml" - echo "Copying binary to docker context..." + echo "Copying binaries to docker context..." cp "$PROJECT_ROOT/target/$CARGO_TARGET/release/fips" "$CHAOS_DIR/fips" + cp "$PROJECT_ROOT/target/$CARGO_TARGET/release/fipsctl" "$CHAOS_DIR/fipsctl" else echo "Building FIPS (release)..." cargo build --release --manifest-path="$PROJECT_ROOT/Cargo.toml" - echo "Copying binary to docker context..." + echo "Copying binaries to docker context..." cp "$PROJECT_ROOT/target/release/fips" "$CHAOS_DIR/fips" + cp "$PROJECT_ROOT/target/release/fipsctl" "$CHAOS_DIR/fipsctl" fi -echo "Done. Binary at $CHAOS_DIR/fips" +echo "Done. Binaries at $CHAOS_DIR/{fips,fipsctl}" diff --git a/testing/static/.gitignore b/testing/static/.gitignore index 151aa8e..99e5c83 100644 --- a/testing/static/.gitignore +++ b/testing/static/.gitignore @@ -1,2 +1,3 @@ fips +fipsctl generated-configs diff --git a/testing/static/Dockerfile b/testing/static/Dockerfile index 7be38c6..27ca15a 100644 --- a/testing/static/Dockerfile +++ b/testing/static/Dockerfile @@ -24,8 +24,8 @@ RUN printf '%s\n' \ 'no-resolv' \ >> /etc/dnsmasq.conf -COPY fips /usr/local/bin/ -RUN chmod +x /usr/local/bin/fips +COPY fips fipsctl /usr/local/bin/ +RUN chmod +x /usr/local/bin/fips /usr/local/bin/fipsctl # Static web page served via Python HTTP server RUN printf 'Fuck IPs!\n' > /root/index.html diff --git a/testing/static/scripts/build.sh b/testing/static/scripts/build.sh index 8d53fed..70aa296 100755 --- a/testing/static/scripts/build.sh +++ b/testing/static/scripts/build.sh @@ -49,18 +49,20 @@ if [ "$UNAME_S" = "Darwin" ]; then echo "Building FIPS for Linux (release) using cargo-zigbuild..." cargo zigbuild --release --target "$CARGO_TARGET" --manifest-path="$PROJECT_ROOT/Cargo.toml" - echo "Copying binary to docker context..." + echo "Copying binaries to docker context..." cp "$PROJECT_ROOT/target/$CARGO_TARGET/release/fips" "$DOCKER_DIR/fips" + cp "$PROJECT_ROOT/target/$CARGO_TARGET/release/fipsctl" "$DOCKER_DIR/fipsctl" else # Native Linux build echo "Building FIPS (release)..." cargo build --release --manifest-path="$PROJECT_ROOT/Cargo.toml" - - echo "Copying binary to docker context..." + + echo "Copying binaries to docker context..." cp "$PROJECT_ROOT/target/release/fips" "$DOCKER_DIR/fips" + cp "$PROJECT_ROOT/target/release/fipsctl" "$DOCKER_DIR/fipsctl" fi -echo "Done. Binary at $DOCKER_DIR/fips" +echo "Done. Binaries at $DOCKER_DIR/{fips,fipsctl}" echo "" echo "Generating node configurations from templates..." "$SCRIPT_DIR/generate-configs.sh" "$TOPOLOGY" $MESH_NAME