Current Goal: Build and test container images on OpenShift with Jenkins and supporting multibranches (pull requests).
- Uses ephermeral Jenkins and the configuration is stored in OpenShift project
- S2I to include jobs and additional plugins
- Add Jenkinsfile to your GitHub project (use the example in this project).
- Create a new project
oc new-project <project-name>
- Add the template to OpenShift
oc create -f https://raw.githubusercontent.com/RHsyseng/openshift-pipeline-library/master/jenkins/openshift/template.yaml
- Process template
oc new-app --template docker-image-testing \
-p JENKINS_ORG_FOLDER_NAME=RHsyseng \
-p JENKINS_GITHUB_OWNER=RHsyseng-user \
-p JENKINS_GITHUB_REPO=openshift-client-library \
-p JENKINS_GITHUB_CRED_ID=github \
-p GITHUB_USERNAME=RHsyseng-user \
-p GITHUB_TOKEN=token
- Add Jenkins to the project
oc new-app --template jenkins-ephemeral -p NAMESPACE=$(oc project -q) -p MEMORY_LIMIT=2Gi
- Add the pipeline
oc create -f https://raw.githubusercontent.com/RHsyseng/openshift-pipeline-library/master/jenkins/openshift/pipeline.yaml
- And finally start the pipeline
oc start-build createcred-pipeline