Skip to content

Commit

Permalink
Spin up sensu-core server correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
paramite committed Mar 8, 2021
1 parent 598b321 commit ae6f3eb
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
name: Integration testing
name: Unit test suite run
env:
# sensu container config
SENSU_IMAGE: bitlayer/docker-sensu:1.9.0-1
TRANSPORT_NAME: rabbitmq
RABBITMQ_HOST: 127.0.0.1
RABBITMQ_USER: guest
RABBITMQ_PASSWORD: ""
RABBITMQ_VHOST: "/sensu"
# rabbitmq container config
RABBITMQ_IMAGE: rabbitmq:3.7.24
# qdr container config
QDROUTERD_IMAGE: quay.io/interconnectedcloud/qdrouterd:1.12.0
# loki container config
LOKI_IMAGE: grafana/loki:2.1.0
# misc. config
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
on: push

Expand All @@ -29,7 +39,7 @@ jobs:
docker exec rabbitmq rabbitmqctl set_permissions -p "/sensu" guest ".*" ".*" ".*"
- name: Start Sensu
run: |
docker run --name sensu-core --volume=$PWD/ci/sensu/conf.d:/etc/sensu/conf.d:ro --network host -d $SENSU_IMAGE
docker run --name sensu-core --volume=$PWD/ci/sensu/conf.d:/etc/sensu/conf.d:ro --network host -d $SENSU_IMAGE server
- name: Start Loki
run: |
docker run --name loki --volume=$PWD/ci/loki-config.yaml:/etc/loki/loki-config.yaml:ro -p 3100:3100 -d $LOKI_IMAGE -config.file=/etc/loki/loki-config.yaml
Expand All @@ -40,7 +50,7 @@ jobs:
docker logs qdr
docker logs sensu-core
docker logs loki
- name: Run integration tests
- name: Run unit tests
run: |
export PROJECT_ROOT=/root/go/src/github.com/infrawatch/apputils
docker run -uroot --network host --volume=$PWD:$PROJECT_ROOT:z --workdir $PROJECT_ROOT centos:8 bash ci/run_ci.sh

0 comments on commit ae6f3eb

Please sign in to comment.