add scripts and configuration to deploy with Jenkins Job Builder

These files make it possible to
- build a container image that includes Jenkins Job Builder
- store the container image in the OpenShift ImageStream
- use the container to validate or deploy the Jenkins Jobs

More details about the files are included in the README.md.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos
2020-04-01 13:35:10 +02:00
parent 5caafe7539
commit 6d906b415f
9 changed files with 249 additions and 0 deletions

22
deploy/Dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM centos:latest
RUN true \
&& yum -y install git make python3-pip \
&& pip3 install jenkins-job-builder \
&& yum -y clean all \
&& true
ENV MAKE_TARGET=${MAKE_TARGET:-test}
# Environment that needs to be set before executing checkout-repo.sh
# ENV GIT_REPO=https://github.com/ceph/ceph-csi
# ENV GIT_REF=ci/centos
ADD checkout-repo.sh /opt/build/
# make WORKDIR writable, otherwise git checkout fails
RUN chmod ugo=rwx /opt/build
ENV HOME=/opt/build
WORKDIR /opt/build
CMD ["sh", "-c", "./checkout-repo.sh && make -C deploy ${MAKE_TARGET}"]