You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(ci-cd): make cloud replay CI guidance generic and drop --trigger
Generalize the cloud replay section so it applies to any CI control
plane (GitHub Actions, GitLab CI, Jenkins) and to both Keploy Cloud and
self-hosted setups, remove the --trigger flag, and fix the API key
secret reference (secrets.KEPLOY_API_KEY).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Harshit Pathak <harshit07pathak@gmail.com>
Copy file name to clipboardExpand all lines: versioned_docs/version-4.0.0/ci-cd/github.md
+33-17Lines changed: 33 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,11 +23,11 @@ Keploy can be integrated with GitHub by two methods:-
23
23
1.[Using Shell Scripts](#shell-scripts)
24
24
2.[Using GitHub Actions](#github-actions)
25
25
26
-
If you run a self-hosted Keploy cluster, you can also [run Cloud Replay from CI](#cloud-replay-self-hosted-in-github-actions).
26
+
You can also [run cloud replay from your CI pipeline](#running-cloud-replay-in-ci).
27
27
28
28
## Shell Scripts
29
29
30
-
GitHub scripts are the easiest way to integrate Keploy with GitHub. We will be using [express-mongoose](https://github.com/keploy/samples-typescript/tree/main/express-mongoose) sample-application for the example. You can either add the following script to yout`github workflow` or create a new worflow`.github/workflows/keploy-test.yml`:-
30
+
GitHub scripts are the easiest way to integrate Keploy with GitHub. We will be using [express-mongoose](https://github.com/keploy/samples-typescript/tree/main/express-mongoose) sample-application for the example. You can either add the following script to your`github workflow` or create a new workflow`.github/workflows/keploy-test.yml`:-
31
31
32
32
```yaml
33
33
- name: Checkout Commit
@@ -219,35 +219,45 @@ _And... voila! You have successfully integrated keploy in GitHub CI pipeline
219
219
220
220
---
221
221
222
-
## Cloud Replay (Self-Hosted) in GitHub Actions
222
+
## Running cloud replay in CI
223
223
224
-
If you run a self-hosted Keploy cluster, you can replay your recorded test sets against the cluster directly from CI — with no browser login. CI authenticates using an **API key**, and the replay runs **inside your cluster**.
224
+
Keploy cloud replay re-runs your recorded test sets from a CI pipeline. It works the same way on any CI control plane — GitHub Actions, GitLab CI, Jenkins, and others — and with both Keploy Cloud and a self-hosted Keploy setup. The pipeline authenticates with an API key from an environment variable, so it needs no browser login.
225
225
226
-
> Cloud Replay is an **Enterprise** feature and uses the Enterprise Keploy binary (installed in the workflow below), not the open-source binary.
226
+
> Cloud replay uses the Enterprise Keploy binary, which the steps below install.
227
+
228
+
The flow is the same on every CI system:
229
+
230
+
1. Store your Keploy API key as a secret and expose it as the `KEPLOY_API_KEY` environment variable. The Keploy CLI reads this variable automatically.
231
+
2. Install the Enterprise Keploy binary on the runner.
232
+
3. Run `keploy cloud replay` with your application and cluster details.
233
+
234
+
Because the replay command is plain CLI, it is identical across CI systems:
227
235
228
236
```bash
229
-
export KEPLOY_API_KEY="<API_KEY>"
237
+
keploy cloud replay \
238
+
--app "<NAMESPACE>.<DEPLOYMENT>" \
239
+
--cluster "<CLUSTER>" \
240
+
--namespace "<NAMESPACE>" \
241
+
--delay <DELAY>
230
242
```
231
243
232
-
The Keploy CLI reads `KEPLOY_API_KEY` from the environment automatically, so no `keploy login` or browser step is needed in CI.
233
-
234
-
### 2. Add the workflow
244
+
Replace `<NAMESPACE>`, `<DEPLOYMENT>`, and `<CLUSTER>` with your own values, and set `<DELAY>` to cover your application's startup time.
Replace `<NAMESPACE>`, `<DEPLOYMENT>`, and `<CLUSTER>` with your own values, and set `<DELAY>` to cover your application's startup time.
269
+
### Other CI systems
270
+
271
+
The steps are identical elsewhere — expose `KEPLOY_API_KEY` from your secret store, install the binary, then run the command. For example, GitLab CI uses a masked CI/CD variable and Jenkins uses a credentials binding:
260
272
261
-
> - `--delay` is how long Keploy waits for the app to become ready before sending requests. If it is shorter than the app's cold-start time, the tests can all fail.
262
-
> - The CI runner must be able to reach your cluster's ingress URL.
273
+
```bash
274
+
export KEPLOY_API_KEY="$KEPLOY_API_KEY" # injected from your CI secret store
The step passes when the replay summary reports `Failed 0`.
280
+
> `--delay` sets how long Keploy waits for the application to become ready before it sends requests. If it is shorter than the application's startup time, the tests can fail, so set it to comfortably cover the boot time.
265
281
266
282
Hope this helps you out, if you still have any questions, reach out to us .
0 commit comments