Dockerfile to run jenkins-job-builder.
Available on Docker-Hub
docker pull ypsman/jenkins-jobs
docker run -it --rm -v $(pwd)/jenkins_jobs.ini:/etc/jenkins_jobs/jenkins_jobs.ini \
-v $(pwd)/jobfile.yml:jobsfile.yml ypsman/jenkins-jobs update jobsfile.yml
docker run -it --rm -v $(pwd)/jenkins_jobs.ini:/etc/jenkins_jobs/jenkins_jobs.ini \
-v $(pwd)/jobs:/jobs ypsman/jenkins-jobs update /jobs
This Dockerfile also contains maketools, for a better usage with
Gitlab-ci. Just put a Makefile and gitlab-ci.yml in your Gitlab Project
to autodeploy your Jobs.
Example: Makefile
test:
jenkins-jobs test jobs/
deploy:
jenkins-jobs --conf jenkins_jobs.ini update jobs/
Example: gitlab-ci.yml
image:
name: ypsman/jenkins-jobs
entrypoint: [""]
test:
script:
- make test
- make deploy