Skip to main content

Run tests in Jenkins

Use a Jenkins pipeline stage to trigger Qodex and block the build when scenarios fail.

Before you start

You need:
  • A Qodex project with runnable scenarios.
  • A project API key from Settings > Platform > API keys.
  • A Jenkins agent that can run curl and jq, or a Docker agent.

Store the API key

In Jenkins, open Manage Jenkins > Credentials, then add a credential:
  • Kind: Secret text
  • Secret: your qk_... key
  • ID: qodex-api-key
Expose QODEX_PROJECT as a job or global environment variable with your Qodex project slug.

Add the Jenkinsfile

Save this file as Jenkinsfile.
The withCredentials block keeps the API key out of logs. The Docker agent keeps the runtime predictable.

Make it required

If Jenkins reports build status back to GitHub or GitLab, mark the Jenkins check as required in your branch protection or merge settings.

Generic shell recipe

GitHub Actions recipe