← All Prompt Categories

📚 LLM HUB · 3 PROMPTS

CI/CD Pipeline Integration

3 copy-ready AI prompts for ci/cd pipeline integration in JMeter, k6, and Gatling. Part of the JMeter.AI LLM Hub.

JMeter in Jenkins Pipeline

Generate a Jenkins declarative pipeline (Jenkinsfile) that:
1. Checks out the JMeter test plan from Git
2. Runs JMeter in non-GUI mode with:
   - Test plan: tests/load-test.jmx
   - Results: results/result.jtl
   - HTML report output: reports/
   - Properties overrides: threads=50, rampup=60, duration=300
3. Publishes the HTML report as a Jenkins artifact
4. Parses the JTL to check error rate < 1% and p95 < 500ms
5. Fails the build if thresholds are breached

Include the JMeter command, threshold-checking script (bash or Groovy), and pipeline triggers.

k6 in GitHub Actions

Generate a GitHub Actions workflow file that:
1. Triggers on push to main and on schedule (daily at 2am UTC)
2. Installs k6
3. Runs k6 test with environment variable overrides: BASE_URL, API_KEY
4. Uploads the k6 summary JSON as an artifact
5. Comments the test summary on the PR (if triggered by PR)
6. Fails the workflow if k6 thresholds fail

Include secrets handling for API_KEY and the full YAML workflow.

Performance Gate in CI/CD

I want to implement a performance quality gate in my CI/CD pipeline. Our thresholds are:
- p95 response time < [N]ms
- p99 response time < [N]ms
- Error rate < [N]%
- Throughput > [N] RPS

Write a shell script (or Python script) that:
1. Reads a JMeter .jtl results file (CSV format)
2. Calculates the above metrics
3. Compares against thresholds
4. Exits with code 0 (pass) or 1 (fail) with a human-readable summary
5. Outputs results as JSON for downstream processing

Include error handling for missing or empty results files.