Skip to content

fix(iac): K3s - fix created_hosts name #105

fix(iac): K3s - fix created_hosts name

fix(iac): K3s - fix created_hosts name #105

name: ci-build
on:
push:
branches:
- '**'
tags:
- 'v*.*.*' # e.g., v0.1.1
jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix: # This should be replaced with Docker Bake instead
include:
- name: prometheus
context: observability/prometheus
dockerfile: observability/prometheus/Dockerfile.prometheus
image: cogstacksystems/cogstack-observability-prometheus
- name: blackbox
context: observability/prometheus
dockerfile: observability/prometheus/Dockerfile.blackbox
image: cogstacksystems/cogstack-observability-blackbox-exporter
- name: grafana
context: observability/grafana
dockerfile: observability/grafana/Dockerfile
image: cogstacksystems/cogstack-observability-grafana
- name: traefik
context: observability/traefik
dockerfile: observability/traefik/Dockerfile
image: cogstacksystems/cogstack-observability-traefik
- name: alloy
context: observability/grafana-alloy
dockerfile: observability/grafana-alloy/Dockerfile
image: cogstacksystems/cogstack-observability-alloy
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
tags: |
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}
# Include all default tags
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ matrix.image}}:buildcache
cache-to: type=registry,ref=${{ matrix.image}}:buildcache,mode=max
test-observability-quickstart-scripts:
runs-on: ubuntu-latest
name: Test observability Quickstart scripts
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: pip
- name: Install Python dependencies
run: pip install -r observability/test/requirements.txt
- name: Run Simple quickstart test
run: |
echo "🧪 Running Simple quickstart test..."
bash observability/test/test-quickstart.sh
- name: Report test result
if: always()
run: |
if [ $? -eq 0 ]; then
echo "✅ quickstart test PASSED"
else
echo "❌ quickstart test FAILED"
exit 1
fi