Jenkins plugin - binary build

2016-09-26 Thread Lionel Orellana
Hi Is it possible to trigger a binary build in Jenkins using the openshiftBuild step? I'm basically trying to run something like oc start-build --from-dir= but there's no option to pass from-dir in the openshiftBuild step. Are there plans to support this? Thanks Lionel.

Re: Jenkins plugin - binary build

2016-09-27 Thread Ben Parees
On Sep 27, 2016 2:10 AM, "Lionel Orellana" wrote: > > Hi > > Is it possible to trigger a binary build in Jenkins using the openshiftBuild step? > > I'm basically trying to run something like > > oc start-build --from-dir= > > but there's no option to pass from-dir in the openshiftBuild step. Are

Re: Jenkins plugin - binary build

2016-09-27 Thread Clayton Coleman
There is an API for launching a binary build from a build config - you can do it from a curl call if necessary (run with --loglevel=8 to see an example of that call). You must send as the contents of the POST call the source to build as a tar, zip, or tar.gz On Sep 27, 2016, at 6:35 AM, Ben Paree

Re: Jenkins plugin - binary build

2016-09-27 Thread Lionel Orellana
Thanks. Invoking oc will do. I guess I have to oc login everytime? Somehow related question: can I have one service account with access to start builds across all projects? I created a jenkins service account for this purpose but I'm not sure how to give it access to all projects instead of one b

Re: Jenkins plugin - binary build

2016-09-27 Thread Lionel Orellana
Adding the edit cluster role seems to work. oadm policy add-cluster-role-to-user edit system:serviceaccount:jenkins:jenkins But is feels I'm giving it too much access. I tried with role system:build-controller but that wasn't enough. On 28 September 2016 at 14:00, Lionel Orellana wrote: > Than

Re: Jenkins plugin - binary build

2016-09-28 Thread Cesar Wong
You can always create a new role that only allows the actions that you need to kick off a new build (create on builds and builds/source, read on buildconfigs). Also, if you're running oc inside a pod within OpenShift, oc will use the credentials of the service account used to run the pod. No

Re: Jenkins plugin - binary build

2016-09-28 Thread Lionel Orellana
Ah I am running Jenkins inside a pod and invoking oc from there. Thanks for the tip. Before I can run oc I'm having to set KUBECONFIG to some location I know I can write to. Otherwise I get this error when running any oc command: error: KUBECONFIG is set to a file that cannot be created or modif

Re: Jenkins plugin - binary build

2016-09-29 Thread Ben Parees
On Thu, Sep 29, 2016 at 12:05 AM, Lionel Orellana wrote: > Ah I am running Jenkins inside a pod and invoking oc from there. Thanks > for the tip. > > Before I can run oc I'm having to set KUBECONFIG to some location I know I > can write to. > > Otherwise I get this error when running any oc comma

Re: Jenkins plugin - binary build

2016-10-03 Thread Lionel Orellana
No, I started with the image provided by the jenkins guys. On 30 September 2016 at 01:22, Ben Parees wrote: > > > On Thu, Sep 29, 2016 at 12:05 AM, Lionel Orellana > wrote: > >> Ah I am running Jenkins inside a pod and invoking oc from there. Thanks >> for the tip. >> >> Before I can run oc I'm

Re: Jenkins plugin - binary build

2016-10-03 Thread Ben Parees
On Mon, Oct 3, 2016 at 6:28 PM, Lionel Orellana wrote: > No, I started with the image provided by the jenkins guys. > ​I strongly suggest you use our image which includes the oc tooling and, if instantiated from our template, will have all the correct permissions for interacting with openshift.

Re: Jenkins plugin - binary build

2016-10-04 Thread Lionel Orellana
I wanted to use Jenkins v2 which you didn't have an image for. I see that there is one now. I'll have to consider if it's worth switching over. On 4 October 2016 at 09:54, Ben Parees wrote: > > > On Mon, Oct 3, 2016 at 6:28 PM, Lionel Orellana > wrote: > >> No, I started with the image provided

Re: Jenkins plugin - binary build

2016-10-05 Thread Lionel Orellana
The Jenkins v2 image is not yet available in docker hub is it? On 5 October 2016 at 16:24, Lionel Orellana wrote: > I wanted to use Jenkins v2 which you didn't have an image for. I see that > there is one now. I'll have to consider if it's worth switching over. > > On 4 October 2016 at 09:54, Be

Re: Jenkins plugin - binary build

2016-10-05 Thread Ben Parees
On Oct 5, 2016 6:59 AM, "Lionel Orellana" wrote: > The Jenkins v2 image is not yet available in docker hub is it? > ​it wasn't, but it is now: openshift/jenkins-2-centos7​ > > On 5 October 2016 at 16:24, Lionel Orellana wrote: > >> I wanted to use Jenkins v2 which you didn't have an image f

Re: Jenkins plugin - binary build

2016-10-05 Thread Lionel Orellana
Can you tag the Jenkins images with the Jenkins version you are using or some other convention? I don't like using latest and getting unexpected upgrades. How often do you upgrade the Jenkins version? Thanks. On 6 October 2016 at 02:09, Ben Parees wrote: > > > On Oct 5, 2016 6:59 AM, "Lionel Or

Re: Jenkins plugin - binary build

2016-10-05 Thread Ben Parees
On Wed, Oct 5, 2016 at 6:48 PM, Lionel Orellana wrote: > Can you tag the Jenkins images with the Jenkins version you are using or > some other convention? I don't like using latest and getting unexpected > upgrades. How often do you upgrade the Jenkins version? > ​we upgrade it when we notice th

Re: Jenkins plugin - binary build

2016-10-05 Thread Lionel Orellana
Ok thanks Ben. On 6 October 2016 at 13:01, Ben Parees wrote: > > > On Wed, Oct 5, 2016 at 6:48 PM, Lionel Orellana > wrote: > >> Can you tag the Jenkins images with the Jenkins version you are using or >> some other convention? I don't like using latest and getting unexpected >> upgrades. How o