Changeset View
Changeset View
Standalone View
Standalone View
README.md
Show All 13 Lines | |||||
``` | ``` | ||||
tox | tox | ||||
``` | ``` | ||||
The output displays the jenkins configuration files as they will be applied on the server. | The output displays the jenkins configuration files as they will be applied on the server. | ||||
# Run on docker | # 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 | - Launch jenkins | ||||
``` | ``` | ||||
docker-compose build | docker-compose build | ||||
docker-compose up | docker-compose up | ||||
``` | ``` | ||||
- Get the admin password in the logs | - Get the admin password in the logs | ||||
Connect to localhost:8080, then within the jenkins ui: | Connect to localhost:8080, then within the jenkins ui: | ||||
- Change the `admin` password to `admin123` | - Change the `admin` password to `admin123` | ||||
- Create a jenkins folder `jenkins-tools` | - Create a jenkins folder `jenkins-tools` | ||||
- Create a new `free-style` job named `job-builder` inside the `jenkins-tools` targeting | - 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`) | - Configure the branch (e.g. `*/master`) | ||||
- Add a `build` step `Execute shell` with this content | - Add a `build` step `Execute shell` with this content | ||||
``` | ``` | ||||
tox update -- --delete-old | tox update -- --delete-old | ||||
``` | ``` | ||||
- Save your build configuration | - Save your build configuration | ||||
- Trigger a build \o/ | - Trigger a build \o/ |