Skip to content

Commit

Permalink
feat: add provisioning test to grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
k0rventen committed Jan 26, 2024
1 parent 12347c2 commit 853ad79
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/branch_builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,19 @@ jobs:
name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4
-
name: Docker build & push
name: grafana - docker build & push
uses: docker/build-push-action@v4
with:
context: ./grafana
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ github.repository }}-grafana:${{ env.GITHUB_REF_SLUG }}
-
name: ingester - docker build & push
uses: docker/build-push-action@v4
with:
context: ./ingester
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ github.repository }}-ingester:${{ env.GITHUB_REF_SLUG }}

2 changes: 2 additions & 0 deletions tests/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
version: "3"
services:
grafana:
build: ../grafana
influx:
image: influxdb:1.8
restart: always
Expand Down
10 changes: 9 additions & 1 deletion tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ set -e

chmod a+x tests.sh
docker compose down
docker compose up -d influx
docker compose build

# ingester/influx tests
docker compose up -d influx
docker compose exec influx apt update
docker compose exec influx apt install jq -y
docker compose cp tests.sh influx:/usr/local/bin/
Expand All @@ -16,4 +18,10 @@ do
docker compose exec influx tests.sh
done

# grafana test
docker compose up -d grafana
sleep 10
docker compose exec grafana curl http://127.0.0.1:3000/api/dashboards/home -f -u 'admin:health'


docker compose down

0 comments on commit 853ad79

Please sign in to comment.