Re: Windows agent can't delete workspace

2018-03-18 Thread Benjamin Lau
We've used scripting around the sysinternals handle tool[1] to make sure that everything which is touching files in the workspace is actually terminated before trying to delete the workspace. We were having more issues with this when trying to delete workspaces at the ends of jobs so in many cases

Re: Linting Jenkinsfile

2018-01-16 Thread Benjamin Lau
Hey Mayur, Check in the Manage Jenkins menu. If you search for sshd you should find it pretty quick. :-) /configure Ben P.S. How's it hanging former co-worker? On Tue, Jan 16, 2018 at 1:23 AM, Mayur Nagekar wrote: > Hi Richard, > > How do I configure the sshd port

Re: Invoke Windows Installer in Interactive mode Through Jenkins

2017-04-06 Thread Benjamin Lau
Bangar, I'd suspect the problem is similar to the one described in this thread about 10 days ago: https://groups.google.com/forum/#!topic/jenkinsci-users/zzECJya_vDY Is your jenkins slave running the agent as a service? Try running the agent as a non-service as slide suggested and see if that

Re: Build Duration Information

2015-09-30 Thread Benjamin Lau
This formula isn't perfect but it'll convert a jenkins duration into a human readable time[1]. =IF(INT(1/8640*A3)=0, "",INT(1/8640*A3) &" day, ") & IF(INT(MOD(A3,8640)/360)=0,"", INT(MOD(A3,8640)/360) & " hr, ") & IF(INT(MOD(A3,360)/6)=0,"",

Re: SSH keypair not working for Jenkins CLI

2015-09-18 Thread Benjamin Lau
notice how the directory separator characters are being switched from / to \. My guess is that if you used C:\\cygwin\\home\\efetzer\\.ssh\\id_rsa it might work the way you expect. The java binary you're using isn't aware of what cygwin is doing with paths and such so my guess is that it's

Re: Disable Jenkins Job via HTTP GET or HTTP POST

2015-04-26 Thread Benjamin Lau
Very very simple. http POST https://jenkins.example.com/jenkins//job/example/disable http POST https://jenkins.example.com/jenkins//job/example/enable You'll need to authenticate obviously. Here's a more complete example: curl -X POST https://jenkins.example.com/jenkins//job/example/disable \

Re: How can i get Jenkins to use rvm ruby version ?

2015-03-09 Thread Benjamin Lau
I use an execute shell step with this at the top to force jenkins to do what I want: #!/bin/bash -x source /usr/local/rvm/scripts/rvm rvm use 1.8.7 On Mon, Mar 9, 2015 at 6:33 AM, seun are lummy...@gmail.com wrote: Hi, Can anyone help me? everytime i am running my job on Jenkins its picking up

Re: How to install xcode 6.x command line tools into jenkins user of cloud server using ssh

2015-02-14 Thread Benjamin Lau
Jacob, Well the main problem here is that I don't think that's ever going to work. You said your Jenkins server is Ubuntu running in AWS and XCode is only available for OS X. If you need to do mac builds you're going to need to either run your jenkins instance on a co-located Mac host[1] or set

Re: Filed to build ipa

2014-12-05 Thread Benjamin Lau
This doesn't appear to be a jenkins problem but with the latest version of XCode. Warning: usage of --preserve-metadata with option resource-rules (deprecated in Mac OS X = 10.10)! Warning: --resource-rules has been deprecated in Mac OS X = 10.10! I'd guess that your project file is still set up

Re: Jenkins with stash

2014-09-12 Thread Benjamin Lau
Just like any other git repository. If you're in the stash web ui click on clone and get the appropriate URL. If you're using things with ssh you'll need to generate an ssh key pair for your jenkins server to use to access the repositories. I'm not sure how configuration works for https since I've

Re: Issue with using REST API to schedule multiple jobs

2014-06-27 Thread Benjamin Lau
Try adding an extra parameter that's always different. Some people use a time counter. I've used a hash of the time, user, and other parameters. That should guarantee that each job has a unique parameter set and overcome the problem. I think you can also use the Random String Parameter Plugin[1]

Re: Parameterized Build - Multiple instances of a single parametrized job (a template) AKA fixed parametrized build

2014-06-14 Thread Benjamin Lau
I've done templated builds using the technique described in this article and it worked quite well: http://www.blackpepper.co.uk/generating-new-jenkins-jobs-from-templates-and-parameterised-builds/ For the matrix builds... take a look at the combination filter. This plug-in might also be useful

Re: URGENT: I am new for Jenkins and how to integrate soapui into jenkins.

2014-05-13 Thread Benjamin Lau
Isn't 5 * * * * build on the fifth minute of every hour? Try */5 * * * * Ben On Tue, May 13, 2014 at 10:45 PM, vidhya radha vidhyaradha...@gmail.com wrote: If build triggers it will not show in build history. On Wednesday, May 14, 2014 11:07:30 AM UTC+5:30, vidhya radha wrote: K. I will

Re: IOS app Build using git and test flight in jenkins

2014-04-29 Thread Benjamin Lau
Actually it didn't find ts.sh... I'm assuming that's something that should be in your git repo's root directory. Ben On Tue, Apr 29, 2014 at 4:39 AM, Mark Waite mark.earl.wa...@gmail.com wrote: Usually that would mean that your computer does not have a program named sh in the PATH which

Re: Run build only when requirements/development.txt or similar files have changed

2014-03-31 Thread Benjamin Lau
Hash (shasum) a copy of the file. Store it as a build artifact in the project. When building grab the artifact from the last build compare it to the new value. If the same skip the step otherwise rebuild. Ben On Mon, Mar 31, 2014 at 11:19 AM, Mauricio de Abreu Antunes mauricio.abr...@gmail.com

Re: Increase jobs in build queue of a project

2014-03-03 Thread Benjamin Lau
I'm assuming all of these have the same parameters or are not parameterized at all. Due to this the queue will be culled by Jenkins such that only each unique job will appear in the queue. Marc MacIntyre (in the thread about for loops the other day) suggested the following to compensate for this:

Re: Increase jobs in build queue of a project

2014-03-03 Thread Benjamin Lau
://wiki.jenkins-ci.org/display/JENKINS/Random+String+Parameter+Plugin On Mon, Mar 3, 2014 at 10:18 AM, Benjamin Lau benjamin.a@gmail.com wrote: I'm assuming all of these have the same parameters or are not parameterized at all. Due to this the queue will be culled by Jenkins such that only each

Re: jenkins best practice for automated testing

2014-02-23 Thread Benjamin Lau
The way I've done this in past and current positions has evolved over time. Generally speaking I break all of by build systems up into a couple of parts depending on what capabilities I need these generally break down into the following 5 categories: increment - deals with code checkout (are there

Re: best approach to automate/manage jenkins jobs?

2014-02-21 Thread Benjamin Lau
This sounds similar to the technique described in this post: http://www.blackpepper.co.uk/generating-new-jenkins-jobs-from-templates-and-parameterised-builds/ I've used this technique where I need to have lots of different build which are mostly similar and need to be able to run in parallel.

Re: jenkins+ant+if_then

2014-02-06 Thread Benjamin Lau
You need to pass the parameterized value into ant like this: -DDBName=${DBName} Or handle it like an environment variable by adding this inside the project tag: property environment=env/ And then use ${env.DBName} wherever you need to access it. Cheers, Ben On Thu, Feb 6, 2014 at 12:05 AM,

Re: Semaphore system for matrix jobs

2014-01-20 Thread Benjamin Lau
I've always managed this by limiting the executors on the host where I run the tests... but I'm suspecting you have a set up where each of the VMs has its own computer/node entry in Jenkins so you have one executor for each. You might be able to work around this by setting up one of your systems

Re: Build Flow Question

2013-07-03 Thread Benjamin Lau
Use guard/rescue. guard { parallel ( { build(jobA, ...) }, { build(jobB, ...) }, ... ) } rescue { build(jobC, ...) } That's how I've dealt with it. See Guard / Rescue on the Build Flow Plugin page in the Jenkins wiki:

Re: How to use the same BUILD_NUM in two different jobs?

2013-06-26 Thread Benjamin Lau
You don't want to do this. It's an extremely good practice to make sure that all build numbers are unique. But if you want to do this anyway... I think there's a plugin which let's you explicitly set the build number. I use it to jump the build number up when I make major backward incompatible

Re: Re: How to use the same BUILD_NUM in two different jobs?

2013-06-26 Thread Benjamin Lau
Next Build Number https://wiki.jenkins-ci.org/display/JENKINS/Next+Build+Number+Plugin On Jun 26, 2013 1:06 PM, djx339 djx...@gmail.com wrote: ** can you tell me the plugin name? thanks *From:* Benjamin Lau benjamin.a@gmail.com *Date:* 2013-06-27 01:02 *To:* jenkinsci-users jenkinsci

Re: Re: How to use the same BUILD_NUM in two different jobs?

2013-06-26 Thread Benjamin Lau
@googlegroups.com] On Behalf Of djx339 Sent: Wednesday, June 26, 2013 12:18 PM To: jenkinsci-users Subject: Re: Re: How to use the same BUILD_NUM in two different jobs? thanks From: Benjamin Lau Date: 2013-06-27 01:16 To: jenkinsci-users Subject: Re: Re: How to use the same BUILD_NUM

Re: Is Jenkins the right tool for hundreds of repositories

2013-05-10 Thread Benjamin Lau
I also use git commands directly. If you make it so your build is identical for all of your repositories you could have a single parameterized job which has parameters for the repo and branch (unless everything is always in master). To make this easier to work with I also wrote some shell scripts

Re: Is Jenkins the right tool for hundreds of repositories

2013-05-10 Thread Benjamin Lau
to trigger a build with parameters: http://buildserver:8080/job/buildServer/buildWithParameters?delay=0secserver_git_branch=featureBranch Ben On May 10, 2013 2:10 PM, Jon Drukman jdruk...@gmail.com wrote: On Fri, May 10, 2013 at 10:44 AM, Benjamin Lau benjamin.a@gmail.comwrote: I also use git

Re: Parallel builds

2013-05-03 Thread Benjamin Lau
If you're using ant... are you making use of parallel? For my own use case I needed to run multiple builds of the same code that's managed using maven. I ended up using schroot to create separate environments for each variant to run so I could run them in parallel. Before this we were having

Re: Looking for good Linux bash script examples

2013-03-28 Thread Benjamin Lau
I like to use the approach of storing my bash based build scripts in the scm... having the Jenkins job check them out and then use the shell task to execute them. generally speaking the shell task will then look something like: pushd directory for the scripts bash script name I've also done some

Re: How to publish results of automated tests

2013-03-11 Thread Benjamin Lau
I'd second this option. It's been a good approach to getting test results out of all sorts of tools. I've written scripts that generated this format from shell scripts and other sources depending on what I was doing and they work great and appear just like any other test results in Jenkins. Ben

Re: Converting paths with spaces

2013-01-22 Thread Benjamin Lau
command.com changed to cmd.exe at some point in the last decade or two... maybe that's an NT and later thing... Ben On Tue, Jan 22, 2013 at 1:02 PM, Scott Evans milwrd...@gmail.com wrote: Slide, Yes, that would do pretty much what I needed, if I weren't needing to run this on a Win-7 x64 box

Re: unit testing from shell scripts?

2012-12-07 Thread Benjamin Lau
I've also used the technique of generating xUnit formatted reports from the shell script and having Jenkins pick those up. Required the xUnit plug-in if I recall. Ben On Dec 7, 2012 8:56 AM, Matt Benson gudnabr...@gmail.com wrote: Bill: You might also consider Antunit [1] for a simple means of

Re: Warning - the XCode plugin does not work with static libraries

2012-12-07 Thread Benjamin Lau
I think I might be glad that I chose to roll my own using Ant and xcodebuild... Ben On Fri, Dec 7, 2012 at 3:20 PM, Martin woofbe...@gmail.com wrote: If you have a workspace containing a library, and a project that includes the library, then if you make a change to the library then that change

Re: how to include Jenkins Build Number in Ant script - quick question

2012-11-29 Thread Benjamin Lau
Take a look at XmlTask for Ant. You can then update your xml file using xpath. Ben [1] http://www.oopsconsultancy.com/software/xmltask/ On Thu, Nov 29, 2012 at 7:20 PM, Z W mpc8...@gmail.com wrote: Hi We like to sync up Jenkins build number with our version.xml file. Is there a way to

Re: Open visual studio command line for build

2012-11-29 Thread Benjamin Lau
I think you need to do something like what is mentioned in this stackoverflow post; http://stackoverflow.com/questions/762539/how-do-i-write-a-build-batch-script-that-runs-vcvars32-bat-and-then-continues-w You need to execute the vcvars32.bat script (and it's entirely possible that the name has

Making sure jobs run in sequence

2012-11-09 Thread Benjamin Lau
So I've got 2 jobs build test What I want to be able to do is make sure that they always run in this order and that text blocks build from running and build blocks test from running. I was able to accomplish that using the Locks and Latches plugin. The problem I'm running into is this... If I

Re: How to conditionally build down-stream projects?

2012-10-31 Thread Benjamin Lau
You can get a conditional behavior with the Parameterized Trigger plug-in actually. I have mine set to use a properties file and if the properties file doesn't exist... the triggered build will not run. I manage the creation of the properties file using a shell build step with the following hunk

Re: Switching a matrix job between two matrix sets with a parameter?

2012-09-08 Thread Benjamin Lau
? And how would I make use of a parameter on the build doing the triggering to decide which of two combinations to use? Do you have an example I could look at? Ben On Fri, Aug 31, 2012 at 7:11 AM, Benjamin Lau benjami...@gmail.com wrote: Haha... I'm currently running 2.13... so close

Re: Switching a matrix job between two matrix sets with a parameter?

2012-08-31 Thread Benjamin Lau
Haha... I'm currently running 2.13... so close. ;-) I'll update tonight since the day's builds are just starting. Jenkins was in need of a maintenance cycle anyway. Thanks! Ben On Fri, Aug 31, 2012 at 4:42 AM, cjo cjo.john...@gmail.com wrote: Use the parameterized trigger plugin, as that has

Re: Switching a matrix job between two matrix sets with a parameter?

2012-08-31 Thread Benjamin Lau
31, 2012 at 7:11 AM, Benjamin Lau benjamin.a@gmail.com wrote: Haha... I'm currently running 2.13... so close. ;-) I'll update tonight since the day's builds are just starting. Jenkins was in need of a maintenance cycle anyway. Thanks! Ben On Fri, Aug 31, 2012 at 4:42 AM, cjo cjo.john

Switching a matrix job between two matrix sets with a parameter?

2012-08-30 Thread Benjamin Lau
Hello, Say I've got a matrix job with 2x2x15 jobs. For some builds I would like to have this run as a 2x1x1 matrix instead. Is there an easy way to change the job's combination filter via a parameter or something like that? I tried passing in the combination filter as a build parameter, but I

Re: Is it any good to use Jenkins as a web based UI for running operational scripts?

2012-08-28 Thread Benjamin Lau
I do. While I use Jenkins for build and release type tasks I also have quite a few maintenance scripts that I manage inside it as well. I find this is a better way to keep track of them than keeping them in cron jobs (or System Scheduler on Windows). You can quickly check if they are running and

Re: Putting condition for build of same job

2012-07-16 Thread Benjamin Lau
I've been doing something like this using the parameterized trigger plugin[1]. I actually use it in two ways. For scheduled builds I use predefined parameters. This lets me have a single build script but with different behaviors based on the parameters set by the upstream job. For some situations

Re: very similar jobs as separate jobs

2012-07-06 Thread Benjamin Lau
I've dealt with this by having multiple upstream jobs and using the shell to figure out which job triggered the real job and using that to apply the minor tweaks. I do this for a couple of different situations but the most interesting deals with automatic merging of git branches. I needed to have