Description of problem: cannot create jenkins pipeline buildConfig on free-int env Version-Release number of selected component (if applicable): openshift v3.5.5 kubernetes v1.5.2+43a9be4 How reproducible: Always Steps to Reproduce: 1.Create a project on free-int 2.Create a pipeline bc $ oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/samplepipeline.yaml 3.Check pipeline bc $ oc get bc Actual results: There is no pipeline bc Expected results: Pipeline bc should be existing Additional info:
When we create jenkins server firstly $ oc new-app jenkins-persistent $ oc policy add-role-to-user edit system:serviceaccount:<project>:jenkins Then create pipeline bc, it will succeed $ oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/samplepipeline.yaml $ oc get bc NAME TYPE FROM LATEST nodejs-mongodb-example Source Git 0 sample-pipeline JenkinsPipeline 0 If there is no jenkins server existing before pipeline bc creating, it will fail
this is failing because the cluster appears to be configured to use "openshift/jenkins-ephemeral" as the auto-provisioning template when a jenkins server is needed. Since that template doesn't exist (probably should be just openshift/jenkins?), when we attempt to create a pipeline buildconfig, the creation fails (part of the creation will attempt to provision the jenkins server via the non-existent template and fail, thus failing the buildconfig creation). That's also why it works if you provision the jenkins server yourself, since then the buildconfig pipeline creation can skip the auto-provision logic, and not hit the failure. You can see this from the new-app output: -> Creating resources ... error: Jenkins pipeline template openshift/jenkins-ephemeral not found Assigning to Abhishek since the online environment is misconfigured. Instructions for configuring what template should be used for autoprovisioning can be found here: https://docs.openshift.org/latest/install_config/configuring_pipeline_execution.html
(correction to above: it should be openshift/jenkins-persistent)
origin/master PR: https://github.com/openshift/origin/pull/13649
Test on free-int openshift v3.5.5.3 kubernetes v1.5.2+43a9be4 Actual result: create pipeline bc successfully $ oc new-app jenkins-pipeline-example --> Deploying template "dyan8/jenkins-pipeline-example" to project dyan8 jenkins-pipeline-example --------- This example showcases the new Jenkins Pipeline integration in OpenShift, which performs continuous integration and deployment right on the platform. The template contains a Jenkinsfile - a definition of a multi-stage CI/CD process - that leverages the underlying OpenShift platform for dynamic and scalable builds. OpenShift integrates the status of your pipeline builds into the web console allowing you to see your entire application lifecycle in a single view. A Jenkins server will be automatically instantiated in this project to manage the Pipeline BuildConfig created by this template. You will be able to log in to it using your OpenShift user credentials. * With parameters: * Name=nodejs-mongodb-example * Application Hostname= * Git Repository URL=https://github.com/openshift/nodejs-ex.git * Database Name=sampledb * MongoDB Username=userJ1N # generated * MongoDB Password=xRp4rNXYnlpYOiGF # generated * Memory Limit=256Mi * Memory Limit (MongoDB)=256Mi * Database Service Name=mongodb * Database Administrator Password=o1VQcROeGdGu6J4t # generated * Git Reference= * Context Directory= * GitHub Webhook Secret=SR0bHkQwev65kTBEEmidNENgmFHrhMKNaw5tVrFG # generated * Generic Webhook Secret=aViwkWMkPVterTbKYdAOYiDcqtW4KOx5SH2CkMyX # generated * Custom NPM Mirror URL= * Namespace=openshift --> Creating resources ... buildconfig "sample-pipeline" created service "nodejs-mongodb-example" created route "nodejs-mongodb-example" created imagestream "nodejs-mongodb-example" created buildconfig "nodejs-mongodb-example" created deploymentconfig "nodejs-mongodb-example" created service "mongodb" created deploymentconfig "mongodb" created --> Success Use 'oc start-build sample-pipeline' to start a build. Use 'oc start-build nodejs-mongodb-example' to start a build. Run 'oc status' to view your app.