Bug 1439065
| Summary: | [free][free-int] cannot create jenkins pipeline buildConfig when no jenkins server preinstall | |||
|---|---|---|---|---|
| Product: | OpenShift Online | Reporter: | Dongbo Yan <dyan> | |
| Component: | Build | Assignee: | Abhishek Gupta <abhgupta> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Wenjing Zheng <wzheng> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 3.x | CC: | aos-bugs, bparees, dakini, mmasters | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1439859 (view as bug list) | Environment: | ||
| Last Closed: | 2017-05-01 20:39:11 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | 1439066 | |||
| Bug Blocks: | 1439859 | |||
|
Description
Dongbo Yan
2017-04-05 07:09:49 UTC
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.
|