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

Andrew Lee Rubinger alr at redhat.com
Tue May 17 17:06:35 UTC 2016


Moving to the public list. :)  We can drop "continuous-dev" in replies.

S,
ALR
---------- Forwarded message ----------
From: Xavier Coulon <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


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/930b5060/attachment.htm>


More information about the kontinuity-dev-public mailing list