-
Notifications
You must be signed in to change notification settings - Fork 9
Setup Jenkins #592
Copy link
Copy link
Open
Description
Summary
Set up a local Jenkins instance via Docker Compose with pipeline configuration stored in the repo. Each database target gets its own independent Jenkins job. Pipelines accept a PR number or branch name as a parameter so they can be triggered against any branch under test.
Docker Compose Setup
Add a jenkins/docker-compose.yml:
services:
jenkins:
image: jenkins/jenkins:lts
ports:
- "8080:8080"
volumes:
- jenkins_home:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
volumes:
jenkins_home:Start with:
cd jenkins
docker compose up -dRepo Layout
jenkins/
docker-compose.yml
docs/
setup.md
end-to-end-test/
Jenkinsfile
end-to-end-test-<target>/
Jenkinsfile
Each Jenkins job is configured with:
- Pipeline script from SCM
- Script Path:
jenkins/<pipeline-name>/Jenkinsfile
Jenkinsfile Structure
Pipelines are parameterized to accept a branch name or PR number:
pipeline {
agent any
parameters {
string(name: 'BRANCH', defaultValue: 'main', description: 'Branch name or PR number (e.g. main, pr/123)')
}
stages {
stage('Checkout') {
steps {
git branch: "${params.BRANCH}", url: 'https://github.com/<org>/easy-db-lab.git'
}
}
stage('End-to-End Test') {
steps {
sh 'bin/end-to-end-test <options here>'
}
}
}
}For PR branches, pass refs/pull/<number>/head as the branch name. The docs should cover this distinction.
Tasks
- Add
jenkins/docker-compose.yml - Add
jenkins/docs/setup.mdcovering Jenkins startup, initial admin password, plugin installation, job configuration, and how to trigger a run against a PR or branch - Define the list of pipelines and their corresponding
bin/end-to-end-testarguments - Add a
Jenkinsfilefor each pipeline underjenkins/<pipeline-name>/ - Configure Jenkins jobs (one per pipeline), each pointing to the appropriate Script Path
- Verify parameterized branch/PR checkout works correctly
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels