From a214b43c55c0df9b790ce2822f082820f5b7f0cf Mon Sep 17 00:00:00 2001 From: Harshit Pathak Date: Fri, 26 Jun 2026 08:12:28 +0000 Subject: [PATCH 1/7] docs: revamp CI/CD docs integration Signed-off-by: Harshit Pathak --- versioned_docs/version-4.0.0/ci-cd/github.md | 48 ++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/versioned_docs/version-4.0.0/ci-cd/github.md b/versioned_docs/version-4.0.0/ci-cd/github.md index 4dbcd479b..fa20baf61 100644 --- a/versioned_docs/version-4.0.0/ci-cd/github.md +++ b/versioned_docs/version-4.0.0/ci-cd/github.md @@ -23,6 +23,8 @@ Keploy can be integrated with GitHub by two methods:- 1. [Using Shell Scripts](#shell-scripts) 2. [Using GitHub Actions](#github-actions) +If you run a self-hosted Keploy cluster, you can also [run Cloud Replay from CI](#cloud-replay-self-hosted-in-github-actions). + ## Shell Scripts 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`:- @@ -215,4 +217,50 @@ sudo -E keploy test -c node src/app.js --delay 10 --path ./ _And... voila! You have successfully integrated keploy in GitHub CI pipeline 🌟_ +--- + +## Cloud Replay (Self-Hosted) in GitHub Actions + +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**. + +> Cloud Replay is an **Enterprise** feature and uses the Enterprise Keploy binary (installed in the workflow below), not the open-source binary. + +```bash +export KEPLOY_API_KEY="" +``` + +The Keploy CLI reads `KEPLOY_API_KEY` from the environment automatically, so no `keploy login` or browser step is needed in CI. + +### 2. Add the workflow + +Create `.github/workflows/keploy-cloud-replay.yml`: + +```yaml +jobs: + keploy-cloud-replay: + runs-on: ubuntu-latest + env: + KEPLOY_API_KEY: ${{ KEPLOY_API_KEY }} + steps: + - name: Install Keploy (Enterprise) + run: | + curl --silent --location "https://keploy.io/ent/dl/latest/enterprise_linux_amd64" -o /tmp/keploy + sudo chmod +x /tmp/keploy && sudo mv /tmp/keploy /usr/local/bin/keploy + + - name: Cloud Replay (in-cluster) + run: | + keploy cloud replay \ + --app "." \ + --cluster "" \ + --namespace "" \ + --delay +``` + +Replace ``, ``, and `` with your own values, and set `` to cover your application's startup time. + +> - `--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. +> - The CI runner must be able to reach your cluster's ingress URL. + +The step passes when the replay summary reports `Failed 0`. + Hope this helps you out, if you still have any questions, reach out to us . From b8a431ab6afd4a91fb49d0760e8b7c97bd33ae6c Mon Sep 17 00:00:00 2001 From: Harshit Pathak Date: Fri, 26 Jun 2026 08:59:02 +0000 Subject: [PATCH 2/7] 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) Signed-off-by: Harshit Pathak --- versioned_docs/version-4.0.0/ci-cd/github.md | 50 +++++++++++++------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/versioned_docs/version-4.0.0/ci-cd/github.md b/versioned_docs/version-4.0.0/ci-cd/github.md index fa20baf61..36019622c 100644 --- a/versioned_docs/version-4.0.0/ci-cd/github.md +++ b/versioned_docs/version-4.0.0/ci-cd/github.md @@ -23,11 +23,11 @@ Keploy can be integrated with GitHub by two methods:- 1. [Using Shell Scripts](#shell-scripts) 2. [Using GitHub Actions](#github-actions) -If you run a self-hosted Keploy cluster, you can also [run Cloud Replay from CI](#cloud-replay-self-hosted-in-github-actions). +You can also [run cloud replay from your CI pipeline](#running-cloud-replay-in-ci). ## Shell Scripts -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`:- +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`:- ```yaml - name: Checkout Commit @@ -219,35 +219,45 @@ _And... voila! You have successfully integrated keploy in GitHub CI pipeline --- -## Cloud Replay (Self-Hosted) in GitHub Actions +## Running cloud replay in CI -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**. +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. -> Cloud Replay is an **Enterprise** feature and uses the Enterprise Keploy binary (installed in the workflow below), not the open-source binary. +> Cloud replay uses the Enterprise Keploy binary, which the steps below install. + +The flow is the same on every CI system: + +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. +2. Install the Enterprise Keploy binary on the runner. +3. Run `keploy cloud replay` with your application and cluster details. + +Because the replay command is plain CLI, it is identical across CI systems: ```bash -export KEPLOY_API_KEY="" +keploy cloud replay \ + --app "." \ + --cluster "" \ + --namespace "" \ + --delay ``` -The Keploy CLI reads `KEPLOY_API_KEY` from the environment automatically, so no `keploy login` or browser step is needed in CI. - -### 2. Add the workflow +Replace ``, ``, and `` with your own values, and set `` to cover your application's startup time. -Create `.github/workflows/keploy-cloud-replay.yml`: +### Example: GitHub Actions ```yaml jobs: keploy-cloud-replay: runs-on: ubuntu-latest env: - KEPLOY_API_KEY: ${{ KEPLOY_API_KEY }} + KEPLOY_API_KEY: ${{ secrets.KEPLOY_API_KEY }} steps: - - name: Install Keploy (Enterprise) + - name: Install Keploy run: | curl --silent --location "https://keploy.io/ent/dl/latest/enterprise_linux_amd64" -o /tmp/keploy sudo chmod +x /tmp/keploy && sudo mv /tmp/keploy /usr/local/bin/keploy - - name: Cloud Replay (in-cluster) + - name: Cloud replay run: | keploy cloud replay \ --app "." \ @@ -256,11 +266,17 @@ jobs: --delay ``` -Replace ``, ``, and `` with your own values, and set `` to cover your application's startup time. +### Other CI systems + +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: -> - `--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. -> - The CI runner must be able to reach your cluster's ingress URL. +```bash +export KEPLOY_API_KEY="$KEPLOY_API_KEY" # injected from your CI secret store +curl --silent --location "https://keploy.io/ent/dl/latest/enterprise_linux_amd64" -o /tmp/keploy +sudo chmod +x /tmp/keploy && sudo mv /tmp/keploy /usr/local/bin/keploy +keploy cloud replay --app "." --cluster "" --namespace "" --delay +``` -The step passes when the replay summary reports `Failed 0`. +> `--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. Hope this helps you out, if you still have any questions, reach out to us . From 3df72195967e9c47b42c100f5d380d72523ba1af Mon Sep 17 00:00:00 2001 From: Harshit Pathak Date: Fri, 26 Jun 2026 09:15:21 +0000 Subject: [PATCH 3/7] docs(ci-cd): add cloud replay section to GitLab and Jenkins docs Add the "Running cloud replay in CI" section to gitlab.md and jenkins.md, matching the section already in github.md. Each file has a system-specific example (GitLab masked variable / Jenkins withCredentials) but the core flow is the same: set KEPLOY_API_KEY from the CI secret store, install the Enterprise binary, run keploy cloud replay. Works with both Keploy Cloud and self-hosted. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Harshit Pathak --- versioned_docs/version-4.0.0/ci-cd/github.md | 50 ++++++++++++++++ versioned_docs/version-4.0.0/ci-cd/gitlab.md | 45 ++++++++++++++ versioned_docs/version-4.0.0/ci-cd/jenkins.md | 58 +++++++++++++++++++ 3 files changed, 153 insertions(+) diff --git a/versioned_docs/version-4.0.0/ci-cd/github.md b/versioned_docs/version-4.0.0/ci-cd/github.md index 36019622c..2bb22fb6a 100644 --- a/versioned_docs/version-4.0.0/ci-cd/github.md +++ b/versioned_docs/version-4.0.0/ci-cd/github.md @@ -280,3 +280,53 @@ keploy cloud replay --app "." --cluster "" --nam > `--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. Hope this helps you out, if you still have any questions, reach out to us . + +--- + +## Running cloud replay in CI + +Keploy cloud replay re-runs your recorded test sets from a CI pipeline. It works with both **Keploy Cloud** and a **self-hosted Keploy** setup β€” the command is the same either way. + +### How authentication works + +The CLI reads the `KEPLOY_API_KEY` environment variable automatically. You do not need to pass it as a flag or log in through a browser. + +- Locally: `export KEPLOY_API_KEY=""` before running the command. +- In CI: add the key as a secret in your CI settings so the system injects it as an environment variable at runtime. Never hardcode it in your pipeline file. + +In GitHub Actions, secrets are stored under **Settings β†’ Secrets and variables β†’ Actions** and referenced in the pipeline as `${{ secrets.KEPLOY_API_KEY }}`. + +### Steps + +1. Add `KEPLOY_API_KEY` as a repository secret in GitHub (**Settings β†’ Secrets and variables β†’ Actions**). +2. Install the Enterprise Keploy binary on the runner. +3. Run `keploy cloud replay` with your application and cluster details. + +> Cloud replay requires the Enterprise binary (`keploy.io/ent/dl/latest/enterprise_linux_amd64`), not the open-source one. + +### Example: GitHub Actions + +```yaml +jobs: + keploy-cloud-replay: + runs-on: ubuntu-latest + env: + KEPLOY_API_KEY: ${{ secrets.KEPLOY_API_KEY }} + steps: + - name: Install Keploy Enterprise + run: | + curl --silent --location "https://keploy.io/ent/dl/latest/enterprise_linux_amd64" -o /tmp/keploy + sudo chmod +x /tmp/keploy && sudo mv /tmp/keploy /usr/local/bin/keploy + + - name: Cloud replay + run: | + keploy cloud replay \ + --app "." \ + --cluster "" \ + --namespace "" \ + --delay +``` + +Replace ``, ``, ``, and `` with your own values. Set `` to cover your application's startup time (in seconds). + +> `KEPLOY_API_KEY: ${{ secrets.KEPLOY_API_KEY }}` pulls the secret from GitHub's secret store and makes it available as a plain environment variable in all subsequent steps. diff --git a/versioned_docs/version-4.0.0/ci-cd/gitlab.md b/versioned_docs/version-4.0.0/ci-cd/gitlab.md index a29506e4e..1b8b5870d 100644 --- a/versioned_docs/version-4.0.0/ci-cd/gitlab.md +++ b/versioned_docs/version-4.0.0/ci-cd/gitlab.md @@ -146,3 +146,48 @@ Integrating Keploy with GitLab CI automates the testing process, ensuring that t If you’re thinking, β€œThis pipeline looks cool, but I need the _whole thing_ to integrate with your application!” β€” well, you're in luck! Check it out [here](https://github.com/keploy/samples-python) and get ready to copy-paste your way to success! βœ¨πŸš€ Hope this helps you out, if you still have any questions, reach out to us . + +--- + +## Running cloud replay in CI + +Keploy cloud replay re-runs your recorded test sets from a CI pipeline. It works with both **Keploy Cloud** and a **self-hosted Keploy** setup β€” the command is the same either way. + +### How authentication works + +The CLI reads the `KEPLOY_API_KEY` environment variable automatically. You do not need to pass it as a flag or log in through a browser. + +- Locally: `export KEPLOY_API_KEY=""` before running the command. +- In CI: add the key as a masked CI/CD variable so the system injects it as an environment variable at runtime. Never hardcode it in your pipeline file. + +In GitLab CI, go to **Settings β†’ CI/CD β†’ Variables**, add `KEPLOY_API_KEY` as a masked variable, and it is automatically available in all pipeline jobs as `$KEPLOY_API_KEY`. + +### Steps + +1. Add `KEPLOY_API_KEY` as a masked CI/CD variable (**Settings β†’ CI/CD β†’ Variables**). +2. Install the Enterprise Keploy binary on the runner. +3. Run `keploy cloud replay` with your application and cluster details. + +> Cloud replay requires the Enterprise binary (`keploy.io/ent/dl/latest/enterprise_linux_amd64`), not the open-source one. + +### Example: GitLab CI + +```yaml +keploy-cloud-replay: + stage: test + image: ubuntu:22.04 + # KEPLOY_API_KEY is injected automatically from the masked CI/CD variable + script: + - apt-get update -qq && apt-get install -y -qq curl sudo + - curl --silent --location "https://keploy.io/ent/dl/latest/enterprise_linux_amd64" -o /tmp/keploy + - chmod +x /tmp/keploy && mv /tmp/keploy /usr/local/bin/keploy + - keploy cloud replay + --app "." + --cluster "" + --namespace "" + --delay +``` + +Replace ``, ``, ``, and `` with your own values. Set `` to cover your application's startup time (in seconds). + +> Because `KEPLOY_API_KEY` is defined as a masked variable in GitLab, it is already present in the job's environment β€” no `export` step is needed. diff --git a/versioned_docs/version-4.0.0/ci-cd/jenkins.md b/versioned_docs/version-4.0.0/ci-cd/jenkins.md index cabb6bf68..4d95eb637 100644 --- a/versioned_docs/version-4.0.0/ci-cd/jenkins.md +++ b/versioned_docs/version-4.0.0/ci-cd/jenkins.md @@ -171,3 +171,61 @@ Testrun passed for testcase with id: "test-2" _And... voila! You have successfully integrated keploy in Jenkins CI/CD pipeline 🌟_ Hope this helps you out, if you still have any questions, reach out to us . + +--- + +## Running cloud replay in CI + +Keploy cloud replay re-runs your recorded test sets from a CI pipeline. It works with both **Keploy Cloud** and a **self-hosted Keploy** setup β€” the command is the same either way. + +### How authentication works + +The CLI reads the `KEPLOY_API_KEY` environment variable automatically. You do not need to pass it as a flag or log in through a browser. + +- Locally: `export KEPLOY_API_KEY=""` before running the command. +- In CI: add the key to Jenkins' credentials store so the system injects it as an environment variable at runtime. Never hardcode it in your Jenkinsfile. + +In Jenkins, go to **Manage Jenkins β†’ Credentials**, add a **Secret text** credential with ID `keploy-api-key`, and use `withCredentials` in your pipeline to bind it to `KEPLOY_API_KEY`. + +### Steps + +1. Add `KEPLOY_API_KEY` as a **Secret text** credential in Jenkins (**Manage Jenkins β†’ Credentials**). +2. Install the Enterprise Keploy binary on the agent. +3. Run `keploy cloud replay` with your application and cluster details. + +> Cloud replay requires the Enterprise binary (`keploy.io/ent/dl/latest/enterprise_linux_amd64`), not the open-source one. + +### Example: Jenkins Declarative Pipeline + +```groovy +pipeline { + agent any + stages { + stage('Install Keploy Enterprise') { + steps { + sh ''' + curl --silent --location "https://keploy.io/ent/dl/latest/enterprise_linux_amd64" -o /tmp/keploy + sudo chmod +x /tmp/keploy && sudo mv /tmp/keploy /usr/local/bin/keploy + ''' + } + } + stage('Cloud replay') { + steps { + withCredentials([string(credentialsId: 'keploy-api-key', variable: 'KEPLOY_API_KEY')]) { + sh ''' + keploy cloud replay \ + --app "." \ + --cluster "" \ + --namespace "" \ + --delay + ''' + } + } + } + } +} +``` + +Replace ``, ``, ``, and `` with your own values. Set `` to cover your application's startup time (in seconds). + +> `withCredentials` binds the Jenkins secret to `KEPLOY_API_KEY` only for the duration of that stage β€” the CLI picks it up automatically. From b48c161734c23037c7873f07659a89c838e86bce Mon Sep 17 00:00:00 2001 From: Harshit Pathak Date: Fri, 26 Jun 2026 09:24:19 +0000 Subject: [PATCH 4/7] docs(ci-cd): fix Vale spelling errors in cloud replay section Replace hardcode with hard-code and Jenkinsfile with Jenkins pipeline file to pass Vale spell check. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Harshit Pathak --- versioned_docs/version-4.0.0/ci-cd/github.md | 2 +- versioned_docs/version-4.0.0/ci-cd/gitlab.md | 2 +- versioned_docs/version-4.0.0/ci-cd/jenkins.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/versioned_docs/version-4.0.0/ci-cd/github.md b/versioned_docs/version-4.0.0/ci-cd/github.md index 2bb22fb6a..34b585a0e 100644 --- a/versioned_docs/version-4.0.0/ci-cd/github.md +++ b/versioned_docs/version-4.0.0/ci-cd/github.md @@ -292,7 +292,7 @@ Keploy cloud replay re-runs your recorded test sets from a CI pipeline. It works The CLI reads the `KEPLOY_API_KEY` environment variable automatically. You do not need to pass it as a flag or log in through a browser. - Locally: `export KEPLOY_API_KEY=""` before running the command. -- In CI: add the key as a secret in your CI settings so the system injects it as an environment variable at runtime. Never hardcode it in your pipeline file. +- In CI: add the key as a secret in your CI settings so the system injects it as an environment variable at runtime. Never hard-code it in your pipeline file. In GitHub Actions, secrets are stored under **Settings β†’ Secrets and variables β†’ Actions** and referenced in the pipeline as `${{ secrets.KEPLOY_API_KEY }}`. diff --git a/versioned_docs/version-4.0.0/ci-cd/gitlab.md b/versioned_docs/version-4.0.0/ci-cd/gitlab.md index 1b8b5870d..b2f6ae264 100644 --- a/versioned_docs/version-4.0.0/ci-cd/gitlab.md +++ b/versioned_docs/version-4.0.0/ci-cd/gitlab.md @@ -158,7 +158,7 @@ Keploy cloud replay re-runs your recorded test sets from a CI pipeline. It works The CLI reads the `KEPLOY_API_KEY` environment variable automatically. You do not need to pass it as a flag or log in through a browser. - Locally: `export KEPLOY_API_KEY=""` before running the command. -- In CI: add the key as a masked CI/CD variable so the system injects it as an environment variable at runtime. Never hardcode it in your pipeline file. +- In CI: add the key as a masked CI/CD variable so the system injects it as an environment variable at runtime. Never hard-code it in your pipeline file. In GitLab CI, go to **Settings β†’ CI/CD β†’ Variables**, add `KEPLOY_API_KEY` as a masked variable, and it is automatically available in all pipeline jobs as `$KEPLOY_API_KEY`. diff --git a/versioned_docs/version-4.0.0/ci-cd/jenkins.md b/versioned_docs/version-4.0.0/ci-cd/jenkins.md index 4d95eb637..ad6ebf72b 100644 --- a/versioned_docs/version-4.0.0/ci-cd/jenkins.md +++ b/versioned_docs/version-4.0.0/ci-cd/jenkins.md @@ -183,7 +183,7 @@ Keploy cloud replay re-runs your recorded test sets from a CI pipeline. It works The CLI reads the `KEPLOY_API_KEY` environment variable automatically. You do not need to pass it as a flag or log in through a browser. - Locally: `export KEPLOY_API_KEY=""` before running the command. -- In CI: add the key to Jenkins' credentials store so the system injects it as an environment variable at runtime. Never hardcode it in your Jenkinsfile. +- In CI: add the key to Jenkins' credentials store so the system injects it as an environment variable at runtime. Never hard-code it in your Jenkins pipeline file. In Jenkins, go to **Manage Jenkins β†’ Credentials**, add a **Secret text** credential with ID `keploy-api-key`, and use `withCredentials` in your pipeline to bind it to `KEPLOY_API_KEY`. From cc5e48314e49301618a6b58cf50c94c21be403d6 Mon Sep 17 00:00:00 2001 From: Harshit Pathak Date: Fri, 26 Jun 2026 09:27:51 +0000 Subject: [PATCH 5/7] docs(ci-cd): fix duplicate section, add full YAML, address review comments - Remove duplicate Running cloud replay section that was stacked from two separate commits - Add name: and on: triggers to GitHub Actions YAML snippet so it is a complete, copy-pasteable workflow file - Consolidate steps with system-specific secret store instructions for GitHub Actions, GitLab CI, and Jenkins Fixes review comments from amaan-bhati. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Harshit Pathak --- versioned_docs/version-4.0.0/ci-cd/github.md | 97 +++++--------------- 1 file changed, 21 insertions(+), 76 deletions(-) diff --git a/versioned_docs/version-4.0.0/ci-cd/github.md b/versioned_docs/version-4.0.0/ci-cd/github.md index 34b585a0e..5c1b9a68c 100644 --- a/versioned_docs/version-4.0.0/ci-cd/github.md +++ b/versioned_docs/version-4.0.0/ci-cd/github.md @@ -221,92 +221,35 @@ _And... voila! You have successfully integrated keploy in GitHub CI pipeline ## Running cloud replay in CI -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. - -> Cloud replay uses the Enterprise Keploy binary, which the steps below install. - -The flow is the same on every CI system: - -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. -2. Install the Enterprise Keploy binary on the runner. -3. Run `keploy cloud replay` with your application and cluster details. - -Because the replay command is plain CLI, it is identical across CI systems: - -```bash -keploy cloud replay \ - --app "." \ - --cluster "" \ - --namespace "" \ - --delay -``` - -Replace ``, ``, and `` with your own values, and set `` to cover your application's startup time. - -### Example: GitHub Actions - -```yaml -jobs: - keploy-cloud-replay: - runs-on: ubuntu-latest - env: - KEPLOY_API_KEY: ${{ secrets.KEPLOY_API_KEY }} - steps: - - name: Install Keploy - run: | - curl --silent --location "https://keploy.io/ent/dl/latest/enterprise_linux_amd64" -o /tmp/keploy - sudo chmod +x /tmp/keploy && sudo mv /tmp/keploy /usr/local/bin/keploy - - - name: Cloud replay - run: | - keploy cloud replay \ - --app "." \ - --cluster "" \ - --namespace "" \ - --delay -``` - -### Other CI systems - -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: - -```bash -export KEPLOY_API_KEY="$KEPLOY_API_KEY" # injected from your CI secret store -curl --silent --location "https://keploy.io/ent/dl/latest/enterprise_linux_amd64" -o /tmp/keploy -sudo chmod +x /tmp/keploy && sudo mv /tmp/keploy /usr/local/bin/keploy -keploy cloud replay --app "." --cluster "" --namespace "" --delay -``` - -> `--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. - -Hope this helps you out, if you still have any questions, reach out to us . - ---- - -## Running cloud replay in CI - -Keploy cloud replay re-runs your recorded test sets from a CI pipeline. It works with both **Keploy Cloud** and a **self-hosted Keploy** setup β€” the command is the same either way. +Keploy cloud replay re-runs your recorded test sets from a CI pipeline. It works with both **Keploy Cloud** and a **self-hosted Keploy** setup, and on any CI control plane β€” GitHub Actions, GitLab CI, Jenkins, and others. ### How authentication works -The CLI reads the `KEPLOY_API_KEY` environment variable automatically. You do not need to pass it as a flag or log in through a browser. +The CLI reads the `KEPLOY_API_KEY` environment variable automatically β€” no browser login needed. -- Locally: `export KEPLOY_API_KEY=""` before running the command. -- In CI: add the key as a secret in your CI settings so the system injects it as an environment variable at runtime. Never hard-code it in your pipeline file. +- **Locally:** `export KEPLOY_API_KEY=""` before running the command. +- **In CI:** store the key as a secret in your CI system so it gets injected as an environment variable at runtime. Never hard-code it in your pipeline file. -In GitHub Actions, secrets are stored under **Settings β†’ Secrets and variables β†’ Actions** and referenced in the pipeline as `${{ secrets.KEPLOY_API_KEY }}`. +> Cloud replay requires the Enterprise binary (`keploy.io/ent/dl/latest/enterprise_linux_amd64`), not the open-source one. ### Steps -1. Add `KEPLOY_API_KEY` as a repository secret in GitHub (**Settings β†’ Secrets and variables β†’ Actions**). -2. Install the Enterprise Keploy binary on the runner. -3. Run `keploy cloud replay` with your application and cluster details. - -> Cloud replay requires the Enterprise binary (`keploy.io/ent/dl/latest/enterprise_linux_amd64`), not the open-source one. +1. **Store the API key** β€” add `KEPLOY_API_KEY` as a secret in your CI system. + - GitHub Actions: go to **Settings β†’ Secrets and variables β†’ Actions β†’ New repository secret**, name it `KEPLOY_API_KEY`. + - GitLab CI: go to **Settings β†’ CI/CD β†’ Variables**, add it as a masked variable. + - Jenkins: add a **Secret text** credential via **Manage Jenkins β†’ Credentials**. +2. **Install** the Enterprise Keploy binary on the runner. +3. **Run** `keploy cloud replay` with your application and cluster details. ### Example: GitHub Actions ```yaml +name: Keploy Cloud Replay + +on: + push: + branches: [main] + jobs: keploy-cloud-replay: runs-on: ubuntu-latest @@ -327,6 +270,8 @@ jobs: --delay ``` -Replace ``, ``, ``, and `` with your own values. Set `` to cover your application's startup time (in seconds). +Replace ``, ``, ``, and `` with your own values. Set `` (in seconds) to comfortably cover your application's startup time. + +> `KEPLOY_API_KEY: ${{ secrets.KEPLOY_API_KEY }}` pulls the value from GitHub's secret store and makes it available as an environment variable in all subsequent steps. -> `KEPLOY_API_KEY: ${{ secrets.KEPLOY_API_KEY }}` pulls the secret from GitHub's secret store and makes it available as a plain environment variable in all subsequent steps. +Hope this helps you out, if you still have any questions, reach out to us . From da992114f8d6386ad356f69c0af3914ebcdb6825 Mon Sep 17 00:00:00 2001 From: Harshit Pathak Date: Fri, 26 Jun 2026 09:46:06 +0000 Subject: [PATCH 6/7] docs(ci-cd): fix GitLab CI multi-line command to use shell continuation Use YAML block scalar (|) with backslash line continuations for the keploy cloud replay command, matching the Jenkins example style. The previous YAML plain scalar folding was non-idiomatic and misleading to readers. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Harshit Pathak --- versioned_docs/version-4.0.0/ci-cd/gitlab.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/versioned_docs/version-4.0.0/ci-cd/gitlab.md b/versioned_docs/version-4.0.0/ci-cd/gitlab.md index b2f6ae264..6df833b68 100644 --- a/versioned_docs/version-4.0.0/ci-cd/gitlab.md +++ b/versioned_docs/version-4.0.0/ci-cd/gitlab.md @@ -181,11 +181,12 @@ keploy-cloud-replay: - apt-get update -qq && apt-get install -y -qq curl sudo - curl --silent --location "https://keploy.io/ent/dl/latest/enterprise_linux_amd64" -o /tmp/keploy - chmod +x /tmp/keploy && mv /tmp/keploy /usr/local/bin/keploy - - keploy cloud replay - --app "." - --cluster "" - --namespace "" - --delay + - | + keploy cloud replay \ + --app "." \ + --cluster "" \ + --namespace "" \ + --delay ``` Replace ``, ``, ``, and `` with your own values. Set `` to cover your application's startup time (in seconds). From 716d7143d9d6a856578598e65e148ddcb96bea6e Mon Sep 17 00:00:00 2001 From: Harshit Pathak Date: Fri, 26 Jun 2026 10:00:29 +0000 Subject: [PATCH 7/7] docs(ci-cd): clarify cloud replay only runs k8s-recorded test sets Add a clear note that cloud replay re-runs test sets recorded from a Kubernetes deployment, not local or other recordings. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Harshit Pathak --- versioned_docs/version-4.0.0/ci-cd/github.md | 2 +- versioned_docs/version-4.0.0/ci-cd/gitlab.md | 2 +- versioned_docs/version-4.0.0/ci-cd/jenkins.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/versioned_docs/version-4.0.0/ci-cd/github.md b/versioned_docs/version-4.0.0/ci-cd/github.md index 5c1b9a68c..8f62cba16 100644 --- a/versioned_docs/version-4.0.0/ci-cd/github.md +++ b/versioned_docs/version-4.0.0/ci-cd/github.md @@ -221,7 +221,7 @@ _And... voila! You have successfully integrated keploy in GitHub CI pipeline ## Running cloud replay in CI -Keploy cloud replay re-runs your recorded test sets from a CI pipeline. It works with both **Keploy Cloud** and a **self-hosted Keploy** setup, and on any CI control plane β€” GitHub Actions, GitLab CI, Jenkins, and others. +Keploy cloud replay re-runs test sets that were recorded from a Kubernetes deployment. It works with both **Keploy Cloud** and a **self-hosted Keploy** setup, and on any CI control plane β€” GitHub Actions, GitLab CI, Jenkins, and others. ### How authentication works diff --git a/versioned_docs/version-4.0.0/ci-cd/gitlab.md b/versioned_docs/version-4.0.0/ci-cd/gitlab.md index 6df833b68..082315d24 100644 --- a/versioned_docs/version-4.0.0/ci-cd/gitlab.md +++ b/versioned_docs/version-4.0.0/ci-cd/gitlab.md @@ -151,7 +151,7 @@ Hope this helps you out, if you still have any questions, reach out to us . ## Running cloud replay in CI -Keploy cloud replay re-runs your recorded test sets from a CI pipeline. It works with both **Keploy Cloud** and a **self-hosted Keploy** setup β€” the command is the same either way. +Keploy cloud replay re-runs test sets that were recorded from a Kubernetes deployment. It works with both **Keploy Cloud** and a **self-hosted Keploy** setup β€” the command is the same either way. ### How authentication works diff --git a/versioned_docs/version-4.0.0/ci-cd/jenkins.md b/versioned_docs/version-4.0.0/ci-cd/jenkins.md index ad6ebf72b..de2572b73 100644 --- a/versioned_docs/version-4.0.0/ci-cd/jenkins.md +++ b/versioned_docs/version-4.0.0/ci-cd/jenkins.md @@ -176,7 +176,7 @@ Hope this helps you out, if you still have any questions, reach out to us . ## Running cloud replay in CI -Keploy cloud replay re-runs your recorded test sets from a CI pipeline. It works with both **Keploy Cloud** and a **self-hosted Keploy** setup β€” the command is the same either way. +Keploy cloud replay re-runs test sets that were recorded from a Kubernetes deployment. It works with both **Keploy Cloud** and a **self-hosted Keploy** setup β€” the command is the same either way. ### How authentication works