Install Jenkins locally on your MAC machine


  1. Go to terminal
    • brew install jenkins
      • DNVCOML-6BZ8G3Q:~ user$ brew install jenkins
  2. After successful installation run this command
    • DNVCOML-6BZ8G3Q:~ umahaea$ jenkins --version
  3. Jenkins is usually installed at this location, and lets start Jenkins
    • DNVCOML-6BZ8G3Q:bin umahaea$ pwd
      DNVCOML-6BZ8G3Q:bin umahaea$ jenkins start
    • Look for this message
      • Dec 23, 2018 7:00:35 PM hudson.UDPBroadcastThread run
        INFO: Cannot listen to UDP port 33,848, skipping: Can't assign requested address
        Dec 23, 2018 7:00:35 PM hudson.WebAppMain$3 run
        INFO: Jenkins is fully up and running
  4. Open browser and type localhost:8080jenkins-1
  5. Get the password from the mentioned location, enter and proceed.
    • DNVCOML-6BZ8G3Q:bin umahaea$ cat /Users/umahaea/.jenkins/secrets/initialAdminPassword
  6. Create first admin user and continue
    • jenkins-2
  7. Set up the instance configuration and jenkins is ready to start
  8. Login with the user name and password and you are all set.
  9. If you see this error: :/, then don’t panic :), follow step 10
    1. There were errors checking the update sites: SSLHandshakeException: PKIX path building failed: unable to find valid certification path to requested target
  10. Go to Jenkins -> Manage Jenkins -> Manage Plugins -> Advanced and update the upload site to
  11. And restart Jenkins, you are freed of errors and play around with building your software in CI mode.


Access variables in subsequent steps in Jenkins Job


How to carry over environment variables to subsequent build steps?It is possible by making use of a Jenkins plugin(which is not installed by default)


  1. Install the plugin:
  2. Go to http://your-jenkins-address/pluginManager/available1_moiZY0A7fc9zFVvTwZdlTw
  3. Determine which variable you want to be used in the subsequent build steps
    1. In my case I’m trying to use a variable called ipAddress which I want to pass it on to subsequent steps
  4. Create a properties file in your jenkins box
    1. login as a jenkins user
      • sudo -su jenkins
    2. Create an empty properties file and save it. I have used /var/lib/jenkins
      • /var/lib/jenkins
        • jenkins@ip-:/var/lib/jenkins$ vim
  5. Lets go back to Jenkins Console -> Job
  6. In the Execute Shell, write this step
    • echo “ipAddress=your_value” > ~/
  7. You should be able to add a Inject environment variables step only when step #2 is success
  8. inj
  9. Pass on the properties file path, this will pull all the variables from the properties file and allow it to be used in subsequent steps:
  10. Screen Shot 2018-08-08 at 4.10.10 PM
  11. Try to read the value of $ipAddress from a subsequent execute shell step
  12. Screen Shot 2018-08-08 at 4.20.43 PM
  13. Run the jenkins job.
    • You will be able to see this step printing the ipAddress value.
    • When you cross check in the jenkins box, go into
    • jenkins@ip-:/var/lib/jenkins$ cat

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s