Jenkins jobs configuration
This repository manages the jenkins jobs configuration.
A jenkins jobs applies the configuration on jenkins when a commit is done in this repository
Testing
To test locally the configuration , simply run tox
:
tox
The output displays the jenkins configuration files as they will be applied on the server.
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
docker-compose up
- Get the admin password in the logs
Connect to localhost:8080, then within the jenkins ui:
- Change the
admin
password toadmin123
- Create a jenkins folder
jenkins-tools
- Create a new
free-style
job namedjob-builder
inside thejenkins-tools
targeting this git repositoryfile:///opt/swh-jenkins-jobs
- Configure the branch (e.g.
*/master
) - Add a
build
stepExecute shell
with this content
- Configure the branch (e.g.
tox update -- --delete-old
- Save your build configuration
- Trigger a build \o/