Tuesday, October 11, 2016

Setting Up a Jenkins Master Build

I'm starting on a new project, so of course one of the first things to do is to set up the Jenkins continuous integration server.

First I'm going to set up a build of the master branch. For this I select "new item" on the Jenkins menu, and select "Freestyle Project." For the name of the item, use a short and simple name without spaces, like "project_master".

Under source code management, I put in the git URL, and my github user name and password. By default it wants to build the master branch, so I leave that setting alone.

For build trigger, I select "Build when change is pushed to github."

For build steps, I execute the build script, build.sh. This is a script that exists in my repo and will build and run tests. I have to execute the build script like this:

bash ./build.sh

Now it works and Jenkins shows success!


No comments:

Post a Comment