From f65d229f90c0580a9bd40fdbbeda518e5a5a0873 Mon Sep 17 00:00:00 2001 From: Nicolas MASSE Date: Tue, 16 Apr 2019 13:53:41 +0200 Subject: [PATCH] [skip travis] update doc --- support/openshift/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/support/openshift/README.md b/support/openshift/README.md index 21abf37..a02c48e 100644 --- a/support/openshift/README.md +++ b/support/openshift/README.md @@ -35,3 +35,20 @@ Wait for the build to complete: ```sh oc logs -f bc/deploy-3scale-api-echo-api ``` + +To start this build from a Jenkins pipeline, you will need first to give the `system:build-strategy-custom` role to the `jenkins` Service Account: + +```sh +oc adm policy add-role-to-user system:build-strategy-custom -z jenkins +``` + +Then, from your Jenkins pipeline, you can use: + +```sh +openshift.withCluster() { + openshift.withProject() { + def bc = openshift.selector('bc', "deploy-3scale-api-echo-api"); + bc.startBuild("--wait=true"); + } +} +```