-
Notifications
You must be signed in to change notification settings - Fork 4
98 lines (87 loc) · 4.58 KB
/
github-e2e.yaml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Antithesis Test Run
on: workflow_dispatch
jobs:
build:
permissions:
id-token: write # This is required for requesting the JWT
contents: write # This is required for actions/checkout (read) and publishing tags (write)
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: false
docker-images: true
swap-storage: true
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: https://us-central1-docker.pkg.dev
username: _json_key
password: ${{ secrets.ANTITHESIS_DOCKER_CREDENTIAL }}
- name: "Checkout"
uses: actions/checkout@v3
with:
ref: refs/heads/e2e-test-replicated-scylla
submodules: recursive
fetch-depth: 0
- name: "Gradle Build kafka-client"
uses: gradle/[email protected]
with:
arguments: kafka-client:build -xtest
- name: "Gradle Build"
uses: gradle/[email protected]
with:
arguments: kafka-client-examples:e2e-test:build kafka-client-examples:e2e-test:buildDocker
- name: "Set Kafka Client Version"
run: |
echo "KAFKA_CLIENT_VERSION=$(./gradlew kafka-client:cV | grep "Project version" | sed 's/Project version: //')-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
id: kafka_client_version
- name: "Tag Docker"
env:
KAFKA_CLIENT_VERSION: ${{ steps.kafka_client_version.outputs.KAFKA_CLIENT_VERSION }}
run: |
docker tag e2e-test:$KAFKA_CLIENT_VERSION us-central1-docker.pkg.dev/molten-verve-216720/responsive-repository/e2e-test:$KAFKA_CLIENT_VERSION
- name: "Push Docker"
env:
KAFKA_CLIENT_VERSION: ${{ steps.kafka_client_version.outputs.KAFKA_CLIENT_VERSION }}
run: |
docker push us-central1-docker.pkg.dev/molten-verve-216720/responsive-repository/e2e-test:$KAFKA_CLIENT_VERSION
- name: "Build Config"
working-directory: ./kafka-client-examples/e2e-test/docker/antithesis
env:
KAFKA_CLIENT_VERSION: latest
CONFIG_IMG_VERSION: ${{ steps.kafka_client_version.outputs.KAFKA_CLIENT_VERSION }}
run: |
cat config/docker-compose.yml.template | envsubst > config/docker-compose.yml
docker build . -t us-central1-docker.pkg.dev/molten-verve-216720/responsive-repository/e2e-test-config:$CONFIG_IMG_VERSION
- name: "Push Config"
env:
KAFKA_CLIENT_VERSION: ${{ steps.kafka_client_version.outputs.KAFKA_CLIENT_VERSION }}
run: |
docker push us-central1-docker.pkg.dev/molten-verve-216720/responsive-repository/e2e-test-config:$KAFKA_CLIENT_VERSION
- name: "Run Antithesis Tests"
uses: antithesishq/antithesis-trigger-action@main
with:
notebook_name: responsive
tenant: responsive
username: ${{ secrets.ANTITHESIS_USERNAME }}
password: ${{ secrets.ANTITHESIS_PASSWORD }}
github_token: ${{ secrets.ANTITHESIS_GH_PAT }}
config_image: us-central1-docker.pkg.dev/molten-verve-216720/responsive-repository/e2e-test-config:${{ steps.kafka_client_version.outputs.KAFKA_CLIENT_VERSION }}
images: us-central1-docker.pkg.dev/molten-verve-216720/responsive-repository/e2e-test:${{ steps.kafka_client_version.outputs.KAFKA_CLIENT_VERSION }}
description: "responsive antithesis test run"
email_recipients: "antithesis-responsive-aaaamurlsqy6e3hxnx6ksnec5y@antithesisgroup.slack.com"
additional_parameters: |-
custom.duration: 0.5
# env:
# KAFKA_CLIENT_VERSION: ${{ steps.kafka_client_version.outputs.KAFKA_CLIENT_VERSION }}
# ANTITHESIS_USERNAME: ${{ secrets.ANTITHESIS_USERNAME }}
# ANTITHESIS_PASSWORD: ${{ secrets.ANTITHESIS_PASSWORD }}
# DURATION: 0.5
# run: |
curl -u "$ANTITHESIS_USERNAME:$ANTITHESIS_PASSWORD" -XPOST https://responsive.antithesis.com/api/v1/launch_experiment/responsive -d '{"params": {"antithesis.images":"us-central1-docker.pkg.dev/molten-verve-216720/responsive-repository/e2e-test:'$KAFKA_CLIENT_VERSION'", "antithesis.config_image": "us-central1-docker.pkg.dev/molten-verve-216720/responsive-repository/e2e-test-config:'$KAFKA_CLIENT_VERSION'", "custom.duration": '$DURATION', "antithesis.report.recipients": "antithesis-responsive-aaaamurlsqy6e3hxnx6ksnec5y@antithesisgroup.slack.com", "