Commit graph

16 commits

Author SHA1 Message Date
efa8404ea6
rewrite with much simpler runtime 2026-01-16 17:27:10 -06:00
097c4bd581
Add automatic semver versioning for agent
Features:
- Parse and compare semantic versions from Docker Hub
- Check if current version is outdated on startup
- Only pull updates when newer version is available
- GitLab CI now tags images with Cargo.toml version
- Created bump-version.sh script for easy version bumping

How it works:
1. Cargo.toml contains source of truth version (0.1.0)
2. GitLab CI extracts version and tags Docker images with it
3. Agent queries Docker Hub for all semver tags
4. Compares current version against latest available
5. Only pulls and restarts if newer version exists

Version bumping workflow:
  ./scripts/bump-version.sh patch  # 0.1.0 -> 0.1.1
  ./scripts/bump-version.sh minor  # 0.1.0 -> 0.2.0
  ./scripts/bump-version.sh major  # 0.1.0 -> 1.0.0

This creates git commit and tag, ready to push.
2026-01-15 12:52:36 -06:00
c448b3dcfa
Optimize CI build performance - build amd64 only for main branch
The multi-architecture builds (amd64 + arm64) were taking 15-20+ minutes
due to QEMU emulation for ARM64 cross-compilation. This is too slow for
regular development iteration.

Changes:
- Main branch builds: amd64 only (much faster, ~3-5 minutes)
- Tagged releases: Still build multi-arch (amd64 + arm64)
- Added Docker layer caching to speed up subsequent builds
- Cache stored in registry for persistence across CI runs

The 'latest' tag will be amd64-only from main branch. Users needing
ARM64 should use a specific version tag (e.g., v0.1.0).
2026-01-14 10:03:57 -06:00
813dafb46b
Fix GitLab CI buildx configuration for multi-arch builds
Fixed docker buildx errors in CI/CD pipeline:

1. Set DOCKER_TLS_CERTDIR to empty string to disable TLS
   (buildx with docker-in-docker doesn't work well with TLS certs)

2. Added fallback to reuse existing builder if creation fails
   (docker buildx create ... || docker buildx use ...)

This fixes the error:
'could not create a builder instance with TLS data loaded from environment'
2026-01-14 09:44:32 -06:00
10a3c4353f
Fix buildx setup for GitLab DinD environment 2026-01-13 15:44:19 -06:00
2b1d779279
Add multi-architecture build support (amd64, arm64) 2026-01-13 14:07:21 -06:00
3db5e975a5
Remove nonexistent .cargo/ from CI cache config 2026-01-13 14:00:06 -06:00
82f97deeb2
Add protobuf compiler to CI and Docker build 2026-01-13 13:55:12 -06:00
03dab21a0a
Switch to Docker Hub and use shared runners
- Change registry from GitLab to Docker Hub (gmcintire/towerops-agent)
- Update authentication to use DOCKERHUB_USERNAME and DOCKERHUB_TOKEN
- Remove vntx runner tags to use GitLab shared runners
2026-01-13 13:45:32 -06:00
1f9bdd57cf
rebuild docker image 2026-01-13 13:43:59 -06:00
953d044c9b
change build dest 2026-01-09 17:02:03 -06:00
979369b502
continuing build 2026-01-09 13:57:27 -06:00
fd1b02a6ea
update ci rust version 2026-01-09 13:36:10 -06:00
125b0f427e
update ci rust version 2026-01-09 13:34:43 -06:00
b0fb9c2a78
build multiarch docker container 2026-01-09 13:33:35 -06:00
5263175182
build docker image in ci 2026-01-09 13:32:11 -06:00