Files
fleet/tools/fleetd-linux/build-all.sh
T
Lucas Manuel Rodriguez 05493a8fe5 Changes to ease testing while releasing fleetd to TUF (#44738)
This eases the testing of fleetd updates (to `edge`) on Linux amd64
(from macOS).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Build process now accepts optional CLI configuration parameters
(--update-url, --orbit-channel, --desktop-channel, --osqueryd-channel)
to customize package generation during builds.
* Containerized fleetd services now use a restart policy that keeps
services running unless explicitly stopped, improving reliability and
reducing downtime.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-06 09:06:15 -03:00

40 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
set -euo pipefail
script_dir=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")")
cd "$script_dir"
echo "Building fleetd deb (amd64) package..."
fleetctl package --type=deb \
--enable-scripts \
--fleet-url=https://host.docker.internal:8080 \
--enroll-secret=placeholder \
--fleet-certificate=../osquery/fleet.crt \
--disable-open-folder \
--outfile=fleet-osquery_amd64.deb \
${UPDATE_URL:+--update-url=$UPDATE_URL} \
${ORBIT_CHANNEL:+--orbit-channel=$ORBIT_CHANNEL} \
${DESKTOP_CHANNEL:+--desktop-channel=$DESKTOP_CHANNEL} \
${OSQUERYD_CHANNEL:+--osqueryd-channel=$OSQUERYD_CHANNEL} \
--debug
echo "Building fleetd rpm (amd64) package..."
fleetctl package --type=rpm \
--enable-scripts \
--fleet-url=https://host.docker.internal:8080 \
--enroll-secret=placeholder \
--fleet-certificate=../osquery/fleet.crt \
--disable-open-folder \
--outfile=fleet-osquery_amd64.rpm \
${UPDATE_URL:+--update-url=$UPDATE_URL} \
${ORBIT_CHANNEL:+--orbit-channel=$ORBIT_CHANNEL} \
${DESKTOP_CHANNEL:+--desktop-channel=$DESKTOP_CHANNEL} \
${OSQUERYD_CHANNEL:+--osqueryd-channel=$OSQUERYD_CHANNEL} \
--debug
echo "Building docker images..."
docker build -t fleetd-ubuntu-24.04 --platform=linux/amd64 -f ./ubuntu-24.04/Dockerfile .
docker build -t fleetd-fedora-43 --platform=linux/amd64 -f ./fedora-43/Dockerfile .
docker build -t fleetd-debian-13.4 --platform=linux/amd64 -f ./debian-13.4/Dockerfile .