Add probo-agent binary, installer, and CI

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
Ludovic Vielle
2026-07-14 20:40:18 +02:00
parent b442e1ed76
commit d0dd87c6c7
24 changed files with 1597 additions and 75 deletions

View File

@@ -143,7 +143,7 @@ jobs:
if [ "$GOOS" = "windows" ]; then EXT=".exe"; fi
go build -ldflags "-s -w -X 'main.version=snapshot'" \
-gcflags="-e" -o "dist/probo-agent${EXT}" ./cmd/probo-agent/main.go
-gcflags="-e" -o "dist/probo-agent${EXT}" ./cmd/probo-agent
# ── Snapshot: build Docker images (matrix by architecture) ─────────
build-snapshot-docker:
@@ -281,12 +281,18 @@ jobs:
- uses: "./.github/actions/setup"
with:
node: "false"
- name: "Lint install.sh"
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq shellcheck
sh -n cmd/probo-agent/installer/install.sh
shellcheck cmd/probo-agent/installer/install.sh
- name: "Build probo-agent"
env:
CGO_ENABLED: "0"
run: |
go build -ldflags "-s -w -X 'main.version=snapshot'" \
-gcflags="-e" -o bin/probo-agent ./cmd/probo-agent/main.go
-gcflags="-e" -o bin/probo-agent ./cmd/probo-agent
lint-go:
name: "lint-go"

View File

@@ -45,7 +45,7 @@ jobs:
if [ "$GOOS" = "windows" ]; then EXT=".exe"; fi
go build -ldflags "-s -w -X 'main.version=${VERSION}'" \
-gcflags="-e" -o "dist/probo-agent${EXT}" ./cmd/probo-agent/main.go
-gcflags="-e" -o "dist/probo-agent${EXT}" ./cmd/probo-agent
- name: "Create archive"
env:
GOOS: "${{ matrix.goos }}"
@@ -106,6 +106,33 @@ jobs:
cd archives
sha256sum *.tar.gz *.zip > checksums.txt
cosign sign-blob --bundle="checksums.txt.bundle" checksums.txt --yes
- name: "Inject release checksums into install.sh"
run: |
TAG="${GITHUB_REF_NAME}"
cp cmd/probo-agent/installer/install.sh archives/install.sh
sed -i "s|^RELEASE_TAG=\"__PROBO_AGENT_RELEASE_TAG__\"|RELEASE_TAG=\"${TAG}\"|" archives/install.sh
grep 'probo-agent_.*\.tar\.gz' archives/checksums.txt > archives/probo-agent-checksums.txt
awk '
/# __PROBO_AGENT_CHECKSUMS_BEGIN__/ {
print
while ((getline line < "archives/probo-agent-checksums.txt") > 0) print line
skip = 1
next
}
/# __PROBO_AGENT_CHECKSUMS_END__/ {
skip = 0
print
next
}
!skip { print }
END {
if (skip) {
print "install.sh injection failed: missing # __PROBO_AGENT_CHECKSUMS_END__ marker" > "/dev/stderr"
exit 1
}
}
' archives/install.sh > archives/install.sh.tmp
mv archives/install.sh.tmp archives/install.sh
- name: "Generate SBOM"
uses: "anchore/sbom-action@e22c389904149dbc22b58101806040fa8d37a610" # v0.24.0
with: