-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (54 loc) · 1.68 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Go
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.17
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Format
run: make format
- name: Test
run: make test
- name: Build
run: make build
- name: Set up a Vertica server
timeout-minutes: 15
run: |
docker network create -d bridge vertica
docker pull vertica/vertica-ce:latest
docker run -d -p 5433:5433 -p 5444:5444 \
-itd --network=vertica \
--name vertica_docker \
vertica/vertica-ce
echo "Vertica startup ..."
until docker exec vertica_docker test -f /data/vertica/VMart/agent_start.out; do \
echo "..."; \
sleep 3; \
done;
echo "Vertica is up"
- name: Set up a vertica-prometheus-exporter
timeout-minutes: 15
run: |
docker build . -t vertica-prometheus-exporter
docker run -d -i -p 9968:9968 -itd --network=vertica --name vertica-prometheus-exporter vertica-prometheus-exporter:latest
docker logs vertica-prometheus-exporter
echo "Vertica exporter started successfully..."
docker ps
- name: curl data using exporter from vertica database
timeout-minutes: 15
run: |
echo "getting data using vertica-prometheus-exporter from vertica database..."
curl --location --request GET 'http://localhost:9968/metrics'