[kontinuity-dev-public] [Catapult] Configuring the Jenkins pipeline on OpenShift

James Rawlings jrawling at redhat.com
Tue May 17 17:15:19 UTC 2016


If you're using the the fabric8 kubernetes-workflow plugin then there's a step which handles all of this in the Jenkinsfile  https://github.com/fabric8io/kubernetes-workflow/tree/master/devops-steps#applying-kubernetes-configuration <https://github.com/fabric8io/kubernetes-workflow/tree/master/devops-steps#applying-kubernetes-configuration> it uses the kubernetes client under the hood and optionally performs rolling upgrades when updating apps.

Cheers, James.

--
James Rawlings
Engineering
Red Hat, Inc.
Blog: https://medium.com/@jdrawlings <https://medium.com/@jdrawlings>
Twitter: @jdrawlings <https://twitter.com/jdrawlings>

http://fabric8.io <http://fabric8.io/>
https://blog.fabric8.io/ <https://blog.fabric8.io/>
Open Source microservices platform






> On 17 May 2016, at 18:06, Andrew Lee Rubinger <alr at redhat.com> wrote:
> 
> Moving to the public list. :)  We can drop "continuous-dev" in replies.
> 
> S,
> ALR
> ---------- Forwarded message ----------
> From: Xavier Coulon <xcoulon at redhat.com <mailto:xcoulon at redhat.com>>
> Date: Tue, May 17, 2016 at 12:50 PM
> Subject: [Catapult] Configuring the Jenkins pipeline on OpenShift
> To: continuous-dev at redhat.com <mailto:continuous-dev at redhat.com>
> 
> 
> Hello,
> 
> For the Catapult project, we need to programmatically create a project on OpenShift 3 and then configure it with a Jenkins pipeline so that any build eventually results in the deployment of a new version of the service.
> Ben already provided some OpenShift templates for both Jenkins and a sample project, and my current understanding is that the pipeline template for the sample app describes all the services, routes, build configurations, image streams, etc., including the Jenkins pipeline (a groovy script) nested in a BuildConfig resource. 
> 
> But on the Catapult side, if I run these lines of code (where pipelineTemplate is the content of the `pipelinetemplate.json` file):
> 
>         final Template template = client.templates().load(pipelineTemplate).get();
>         client.templates().inNamespace("openshift").create(template);
> 
> then I have the template created, but this obviously can only be executed once, and it does not seem attached to any particular project.
> 
> What I'm really trying to understand is:
> - what kind of config file should we have along with an application in a GitHub repositories (ie, quickstarts, etc.): a full OpenShift template file, a Jenkinsfile, something else/something more ?
> - how, with Fabric8 OpenShift client, can I submit a request similar to what `oc new-app -f pipelinetemplate.json` does from CLI, to get everything setup in my project ?
> 
> Any response (or clarification if I misunderstood something !) will be very welcome :-)
> 
> Thanks
> Best regards,
> /Xavier 
> 
> 
> 
> -- 
> Red Hat Developer Programs Architecture
> @ALRubinger

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/kontinuity-dev-public/attachments/20160517/c3503c42/attachment.htm>


More information about the kontinuity-dev-public mailing list