This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 8aa0bad0614fc08345dd5b373272876f47b1bd0a Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Thu Sep 26 10:57:33 2019 +0200 Regen docs --- .../ROOT/pages/openshift-builds-component.adoc | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/components/modules/ROOT/pages/openshift-builds-component.adoc b/docs/components/modules/ROOT/pages/openshift-builds-component.adoc index f7f0f6e..fb30f00 100644 --- a/docs/components/modules/ROOT/pages/openshift-builds-component.adoc +++ b/docs/components/modules/ROOT/pages/openshift-builds-component.adoc @@ -83,3 +83,36 @@ with the following path and query parameters: - listBuilds - listBuildsByLabels - getBuild + +== Openshift Builds Producer Examples + +- listBuilds: this operation list the Builds on an Openshift cluster + +[source,java] +-------------------------------------------------------------------------------- +from("direct:list"). + toF("openshift-builds:///?kubernetesClient=#kubernetesClient&operation=listBuilds"). + to("mock:result"); +-------------------------------------------------------------------------------- + +This operation return a List of Builds from your Openshift cluster + +- listBuildsByLabels: this operation list the builds by labels on an Openshift cluster + +[source,java] +-------------------------------------------------------------------------------- +from("direct:listByLabels").process(new Processor() { + + @Override + public void process(Exchange exchange) throws Exception { + Map<String, String> labels = new HashMap<>(); + labels.put("key1", "value1"); + labels.put("key2", "value2"); + exchange.getIn().setHeader(KubernetesConstants.KUBERNETES_BUILDS_LABELS, labels); + } + }); + toF("openshift-builds:///?kubernetesClient=#kubernetesClient&operation=listBuildsByLabels"). + to("mock:result"); +-------------------------------------------------------------------------------- + +This operation return a List of Builds from your cluster, using a label selector (with key1 and key2, with value value1 and value2)