diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -19,6 +19,11 @@ # Run on docker +Jenkins jobs configuration can be tested on a local temporary Jenkins instance +executed in a docker container. The local ``swh-jenkins-jobs`` repository will be +mounted as a volume and cloned by Jenkins so do not forget to commit the changes +you want to test. + - Launch jenkins ``` docker-compose build @@ -30,7 +35,7 @@ - Change the `admin` password to `admin123` - Create a jenkins folder `jenkins-tools` - Create a new `free-style` job named `job-builder` inside the `jenkins-tools` targeting - this git repository `https://forge.softwareheritage.org/source/swh-jenkins-jobs.git` + this git repository `file:///opt/swh-jenkins-jobs` - Configure the branch (e.g. `*/master`) - Add a `build` step `Execute shell` with this content ``` diff --git a/docker-compose.yml b/docker-compose.yml --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,7 @@ volumes: jenkins_data: + services: jenkins: image: swh-jenkins:latest @@ -13,8 +14,10 @@ volumes: - jenkins_data:/var/jenkins_home - /var/run/docker.sock:/var/run/docker.sock + - .:/opt/swh-jenkins-jobs environment: - PLUGINS_FORCE_UPGRADE=true + - JAVA_OPTS=-Dhudson.plugins.git.GitSCM.ALLOW_LOCAL_CHECKOUT=true ports: - 8080:8080 entrypoint: /docker/entrypoint.sh