Configure Jenkins
Status: ⚠️ It works on every Bitbucket Cloud pull request: it reads the PR, runs the plan, and comments the result. It isn't triggered by a label (Bitbucket PRs have no labels) and it doesn't push a branch with the results: they're kept as build artifacts. It hasn't been tested end to end against a real repository yet.
Value in qa-stack.yaml |
stack.pipeline_provider: jenkins + stack.scm_provider: bitbucket |
| File | .jenkins/neo-ci-jobs/Jenkinsfile (your own Jenkinsfile is never touched) |
| How it's wired | A Jenkins Multibranch Pipeline job pointed at that file |
| How it's triggered | On every pull request |
| Image | registry.gitlab.crowdaronline.com/lippia/products/neo/crowdar-engine-mvp:latest-playwright (private registry) |
1. Why Jenkins is different
On GitLab, GitHub, and Bitbucket Pipelines, the CI and the repository are the same product. With Jenkins they aren't: Jenkins runs the pipeline, but the repository and the pull requests live somewhere else (for example, Bitbucket). That's why qa-stack.yaml needs one more field, stack.scm_provider, which tells the engine where the PR is:
crowdar event --provider jenkins -> crowdar run <plan> -> crowdar report --provider jenkins
(reads the PR from Jenkins and gets (the plan) (comments the result
the description from the SCM's API) on the SCM's PR)
scm_provider |
Status |
|---|---|
bitbucket (Cloud) |
✅ Supported |
bitbucket (Data Center / Server) |
❌ Not yet |
github, gitlab |
❌ Not yet: the engine warns instead of guessing |
2. What lippia-neo-bootstrap-ci generates
It always writes .jenkins/neo-ci-jobs/Jenkinsfile, whether or not the repository has a Jenkinsfile at its root. Unlike the other platforms, there's nothing to merge: Jenkins doesn't read files by folder convention, but the one each job points to.
The file has no project data: it reads test_framework, scm_provider, and the paths.* directories from qa-stack.yaml on every run.
3. Step by step
Step 1 — Fill in qa-stack.yaml
lippia-neo-bootstrap-stack detects Jenkins if the repository has a Jenkinsfile, and infers scm_provider from the git remote. If it can't, it asks. It has to end up like this:
stack:
pipeline_provider: jenkins
scm_provider: bitbucket
Step 2 — Generate the file
Generate the project's CI with lippia-neo-bootstrap-ci
Commit .jenkins/neo-ci-jobs/Jenkinsfile.
Step 3 — Prepare Jenkins
| Requirement | Detail |
|---|---|
| Plugins | Pipeline, Docker Pipeline, Credentials Binding, and Bitbucket Branch Source |
| Agents | They must be able to run Docker containers (the pipeline runs inside the engine image) |
| Network | Agents must reach the AI model's API, Bitbucket, and the image registry |
Step 4 — Add the credentials
In Manage Jenkins → Credentials, with these exact ids:
| Id | Type | What for |
|---|---|---|
bitbucket-creds |
Username with password | Read the PR and comment the result. Username: the Atlassian account e-mail. Password: an API token with read access to repositories and PRs and write access to PRs |
crowdar-gitlab |
Username with password | Clone crowdar-qa-skills and pull the engine image (read_repository, read_registry) |
openai-api-key |
Secret text | The models the plans use |
app-test-creds |
Username with password | Optional: the app's test user, written to .env.tests |
Step 5 — Create the job
- New Item → Multibranch Pipeline.
- Branch Sources → Bitbucket: the repository, with pull request discovery.
- Build Configuration → Script Path:
.jenkins/neo-ci-jobs/Jenkinsfile.
The job has three parameters with defaults: NEO_QA_PLAN (plans/feature-new-end-to-end.yaml), SKILLS_REF (develop), and APP_BASE_URL.
Step 6 — Try it
Open a pull request with the user story reference in its description (for example user-stories/US-010.md, or the Jira URL). Jenkins picks it up, runs the plan, and comments the result on the PR.
4. What it runs
| Stage | What it does |
|---|---|
Leer qa-stack.yaml |
Reads the framework, the SCM, and the directories. Stops if scm_provider is missing |
Evento |
crowdar event --provider jenkins → input.json |
Setup |
Clones the skills, installs the framework's dependencies, and writes .env.tests |
Correr el plan |
crowdar run, saving the exit code instead of stopping |
| At the end, always | Comments on the PR, archives input.json, result.json, and the paths.* directories, and only then marks the build red if the plan failed |
5. Common problems (and what to do)
| What you see | Why it happens | What to do |
|---|---|---|
qa-stack.yaml no declara stack.scm_provider |
The SCM is missing from qa-stack.yaml |
Add scm_provider: bitbucket or run lippia-neo-bootstrap-stack again |
cannot read Bitbucket PR #…: missing credentials |
The bitbucket-creds credential doesn't exist or has a different id |
Create it with that exact id |
| The plan says it can't find the user story | The PR description is empty or has no valid reference | Put the story's path or URL in the PR description |
| Pulling the image fails | The agent can't reach Crowdar's registry, or crowdar-gitlab lacks read_registry |
Check the network and the token. On a client's network, the usual approach is to mirror the image to their own registry |
reporting from Jenkins to 'github' is not supported yet |
The SCM isn't Bitbucket | Only Bitbucket Cloud is supported from Jenkins today |
| The job runs on every PR, even when it isn't needed | Bitbucket has no labels to filter by | Add a branch or title condition to the stages' when |