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

Ben Parees bparees at redhat.com
Tue May 17 17:10:00 UTC 2016


invoking "create" with a template object just creates a template resource
object (what we call registering it...making it available in etcd), it
doesn't instantiate the template (ie actually creating the resource objects
defined by the template).

Instantiating the template means posting it to the processtemplate
endpoint, getting back a template object that has had parameter
substitution applied, and then iterating the objects in the result template
and creating each one.

Jeff (on CC) can probably point you to java code that will do this.


On Tue, May 17, 2016 at 1:06 PM, 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>
> 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
>
> _______________________________________________
> kontinuity-dev-public mailing list
> kontinuity-dev-public at redhat.com
> https://www.redhat.com/mailman/listinfo/kontinuity-dev-public
>
>


-- 
Ben Parees | OpenShift
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/kontinuity-dev-public/attachments/20160517/6f6af83b/attachment.htm>


More information about the kontinuity-dev-public mailing list