test k8s comment #90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Integration Test Comment | |
# | |
# This workflow runs one or more integration tests triggered by a comment in a PR. | |
# The comment include '/ci-run-integration'. | |
# Then, any if the integration names will trigger that specific integration. | |
# 'all' will trigger every integration to run. | |
# The order does not matter and can be anywhere inside the comment body. | |
# | |
# Examples: | |
# | |
# 1. Run a single integration test: | |
# | |
# /ci-run-integration amqp | |
# | |
# 2. Run three specific integration tests: | |
# | |
# /ci-run-integration dnstap redis amqp | |
# | |
# 3. Run all integration tests: | |
# | |
# /ci-run-integration all | |
name: Integration Test Comment | |
on: | |
issue_comment: | |
types: [created] | |
env: | |
AWS_ACCESS_KEY_ID: "dummy" | |
AWS_SECRET_ACCESS_KEY: "dummy" | |
AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }} | |
TEST_APPSIGNAL_PUSH_API_KEY: ${{ secrets.TEST_APPSIGNAL_PUSH_API_KEY }} | |
CONTAINER_TOOL: "docker" | |
DD_ENV: "ci" | |
DD_API_KEY: ${{ secrets.DD_API_KEY }} | |
RUST_BACKTRACE: full | |
TEST_LOG: vector=debug | |
VERBOSE: true | |
CI: true | |
PROFILE: debug | |
jobs: | |
prep-pr: | |
name: (PR comment) Signal pending to PR | |
runs-on: ubuntu-latest | |
if: contains(github.event.comment.body, '/ci-run-integration') || contains(github.event.comment.body, '/ci-run-all') | |
steps: | |
- name: Validate issue comment | |
if: github.event_name == 'issue_comment' | |
uses: tspascoal/get-user-teams-membership@v2 | |
with: | |
username: ${{ github.actor }} | |
team: 'Vector' | |
GITHUB_TOKEN: ${{ secrets.GH_PAT_ORG }} | |
- name: (PR comment) Get PR branch | |
uses: xt0rted/pull-request-comment-branch@v2 | |
id: comment-branch | |
- name: (PR comment) Set latest commit status as pending | |
uses: myrotvorets/set-commit-status-action@v1.1.7 | |
with: | |
sha: ${{ steps.comment-branch.outputs.head_sha }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
status: pending | |
test-integration: | |
needs: prep-pr | |
runs-on: [linux, ubuntu-20.04-8core] | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo npm -g install @datadog/datadog-ci | |
- run: docker image prune -af ; docker container prune -f | |
- name: amqp | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-amqp') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 25 | |
max_attempts: 3 | |
retry_on: error | |
command: cargo vdev -v int start amqp ; sleep 10 ; cargo vdev -v int test -a amqp ; cargo vdev -v int stop amqp | |
- name: appsignal | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-appsignal') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 25 | |
max_attempts: 3 | |
retry_on: error | |
command: cargo vdev -v int start appsignal ; sleep 10 ; cargo vdev -v int test -a appsignal ; cargo vdev -v int stop appsignal | |
- name: aws | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-aws') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
retry_on: error | |
command: cargo vdev -v int start aws ; sleep 10 ; cargo vdev -v int test -a aws ; RET=$? ; cargo vdev -v int stop aws ; exit $RET | |
- name: axiom | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-axiom') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
retry_on: error | |
command: cargo vdev -v int start axiom ; sleep 10 ; cargo vdev -v int test -a axiom ; RET=$? ; cargo vdev -v int stop axiom ; exit $RET | |
- name: azure | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-azure') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start azure ; sleep 10 ; cargo vdev -v int test -a azure ; RET=$? ; cargo vdev -v int stop azure ; exit $RET | |
- name: clickhouse | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-clickhouse') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start clickhouse ; sleep 10 ; cargo vdev -v int test -a clickhouse ; RET=$? ; cargo vdev -v int stop clickhouse ; exit $RET | |
- name: databend | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-databeng') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start databend ; sleep 10 ; cargo vdev -v int test -a databend ; RET=$? ; cargo vdev -v int stop databend ; exit $RET | |
- name: datadog-agent | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start datadog-agent ; sleep 10 ; cargo vdev -v int test -a datadog-agent ; RET=$? ; cargo vdev -v int stop datadog-agent ; exit $RET | |
- name: datadog-logs | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start datadog-logs ; sleep 10 ; cargo vdev -v int test -a datadog-logs ; RET=$? ; cargo vdev -v int stop datadog-logs ; exit $RET | |
- name: datadog-metrics | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start datadog-metrics ; sleep 10 ; cargo vdev -v int test -a datadog-metrics ; RET=$? ; cargo vdev -v int stop datadog-metrics ; exit $RET | |
- name: datadog-traces | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start datadog-traces ; sleep 10 ; cargo vdev -v int test -a datadog-traces ; RET=$? ; cargo vdev -v int stop datadog-traces ; exit $RET | |
- name: dnstap | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-dnstap') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start dnstap ; sleep 10 ; cargo vdev -v int test -a dnstap ; RET=$? ; cargo vdev -v int stop dnstap ; exit $RET | |
- run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f | |
- name: docker-logs | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-docker-logs') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start docker-logs ; sleep 10 ; cargo vdev -v int test -a docker-logs ; RET=$? ; cargo vdev -v int stop docker-logs ; exit $RET | |
- name: elasticsearch | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-elasticsearch') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start elasticsearch ; sleep 10 ; cargo vdev -v int test -a elasticsearch ; RET=$? ; cargo vdev -v int stop elasticsearch ; exit $RET | |
- name: eventstoredb | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-eventstoredb') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start eventstoredb ; sleep 10 ; cargo vdev -v int test -a eventstoredb ; RET=$? ; cargo vdev -v int stop eventstoredb ; exit $RET | |
- name: fluent | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-fluent') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start fluent ; sleep 10 ; cargo vdev -v int test -a fluent ; RET=$? ; cargo vdev -v int stop fluent ; exit $RET | |
- name: gcp | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-gcp') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start gcp ; sleep 10 ; cargo vdev -v int test -a gcp ; RET=$? ; cargo vdev -v int stop gcp ; exit $RET | |
- name: humio | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-humio') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start humio ; sleep 10 ; cargo vdev -v int test -a humio ; RET=$? ; cargo vdev -v int stop humio ; exit $RET | |
- name: http-client | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-http-client') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start http-client ; sleep 10 ; cargo vdev -v int test -a http-client ; RET=$? ; cargo vdev -v int stop http-client ; exit $RET | |
- name: influxdb | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-influxdb') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start influxdb ; sleep 10 ; cargo vdev -v int test -a influxdb ; RET=$? ; cargo vdev -v int stop influxdb ; exit $RET | |
- name: kafka | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-kafka') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start kafka ; sleep 10 ; cargo vdev -v int test -a kafka ; RET=$? ; cargo vdev -v int stop kafka ; exit $RET | |
- name: logstash | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-logstash') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start logstash ; sleep 10 ; cargo vdev -v int test -a logstash ; RET=$? ; cargo vdev -v int stop logstash ; exit $RET | |
- name: loki | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-loki') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start loki ; sleep 10 ; cargo vdev -v int test -a loki ; RET=$? ; cargo vdev -v int stop loki ; exit $RET | |
- name: mongodb | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-mongodb') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start mongodb ; sleep 10 ; cargo vdev -v int test -a mongodb ; RET=$? ; cargo vdev -v int stop mongodb ; exit $RET | |
- run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f | |
- name: nats | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-nats') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start nats ; sleep 10 ; cargo vdev -v int test -a nats ; RET=$? ; cargo vdev -v int stop nats ; exit $RET | |
- name: nginx | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-nginx') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start nginx ; sleep 10 ; cargo vdev -v int test -a nginx ; RET=$? ; cargo vdev -v int stop nginx ; exit $RET | |
- name: opentelemetry | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-opentelemetry') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start opentelemetry ; sleep 10 ; cargo vdev -v int test -a opentelemetry ; RET=$? ; cargo vdev -v int stop opentelemetry ; exit $RET | |
- name: postgres | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-postgres') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start postgres ; sleep 10 ; cargo vdev -v int test -a postgres ; RET=$? ; cargo vdev -v int stop postgres ; exit $RET | |
- name: prometheus | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-prometheus') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start prometheus ; sleep 10 ; cargo vdev -v int test -a prometheus ; RET=$? ; cargo vdev -v int stop prometheus ; exit $RET | |
- name: pulsar | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-pulsar') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start pulsar ; sleep 10 ; cargo vdev -v int test -a pulsar ; RET=$? ; cargo vdev -v int stop pulsar ; exit $RET | |
- name: redis | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-redis') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start redis ; sleep 10 ; cargo vdev -v int test -a redis ; RET=$? ; cargo vdev -v int stop redis ; exit $RET | |
- name: shutdown | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-shutdown') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start shutdown ; sleep 10 ; cargo vdev -v int test -a shutdown ; RET=$? ; cargo vdev -v int stop shutdown ; exit $RET | |
- name: splunk | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-splunk') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 7 | |
max_attempts: 3 | |
command: cargo vdev -v int start splunk ; sleep 10 ; cargo vdev -v int test -a splunk ; RET=$? ; cargo vdev -v int stop splunk ; exit $RET | |
- name: webhdfs | |
if: ${{ contains(github.event.comment.body, '/ci-run-integration-webhdfs') || contains(github.event.comment.body, '/ci-run-all') }} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: cargo vdev -v int start webhdfs ; sleep 10 ; cargo vdev -v int test -a webhdfs ; RET=$? ; cargo vdev -v int stop webhdfs ; exit $RET | |
update-pr-status: | |
name: Signal result to PR | |
runs-on: ubuntu-latest | |
needs: test-integration | |
if: always() && (contains(github.event.comment.body, '/ci-run-integration') || contains(github.event.comment.body, '/ci-run-all')) | |
steps: | |
- name: Validate issue comment | |
if: github.event_name == 'issue_comment' | |
uses: tspascoal/get-user-teams-membership@v2 | |
with: | |
username: ${{ github.actor }} | |
team: 'Vector' | |
GITHUB_TOKEN: ${{ secrets.GH_PAT_ORG }} | |
- name: (PR comment) Get PR branch | |
uses: xt0rted/pull-request-comment-branch@v2 | |
id: comment-branch | |
- name: (PR comment) Submit PR result as ${{ needs.test-integration.result }} | |
uses: myrotvorets/set-commit-status-action@v1.1.7 | |
with: | |
sha: ${{ steps.comment-branch.outputs.head_sha }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
status: ${{ needs.test-integration.result }} |