Jenkins: Difference between revisions

From Mu2eWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:


Jenkins is a freeware java code build system that the Scientific Computing Division is maintaining for the experiments. It includes several powerful build machines where the code can be built using significant parallelism. It also has many useful management features. You can browse the [https://buildmaster.fnal.gov/ Jenkins system]. and [https://cdcvs.fnal.gov/redmine/projects/build_service/documents docs for code managers].
Jenkins is a freeware java code build system that the Scientific Computing Division is maintaining for the experiments. It includes several powerful build machines where the code can be built using significant parallelism. It also has many useful management features. You can browse the [https://buildmaster.fnal.gov/ Jenkins system]. and [https://cdcvs.fnal.gov/redmine/projects/build_service/documents docs for code managers].
Anyone can view the jenkins pages, but to edit the pages you need to put in a ticket to get edit permissions in Jenkins, then authorize yourself to the site with a certificate. To edit, the Jenkins page should have your username at the top right. If it says "anonymous", try deleting your "buildmaster" cookies, restarting the browser, check that your cert is loaded in the browser, and try again.


==Running Projects==
==Running Projects==
Line 12: Line 14:
#'''mu2e-offline-ci''' runs every hour and if there was a recent git commit, then run a build which the developers can check for errors.
#'''mu2e-offline-ci''' runs every hour and if there was a recent git commit, then run a build which the developers can check for errors.
#'''mu2e-offline-geant-int''' builds every night to check that the future version of geant is still integrated
#'''mu2e-offline-geant-int''' builds every night to check that the future version of geant is still integrated
Most are driven by a set of scripts kept in the codetools repository and UPS product.
===Nightly build===
The mu2e-offline-nightly project checks out and builds the head every night at about 3AM. It then runs a series of checks:
*10 standard fcl jobs and checks that they have a good return code
*a geometry overlap check
*generates 5,000 events in genReco and produces a set of validation histograms
*copies in a standard file and runs CutAndCount on it
The logs and histogram files are saved. The histograms for validation and CutAndCount are compared to the previous day's histograms and report is made. The results are posted on a [http://mu2e.fnal.gov/atwork/computing/ops/nightlyBuild/nightly.shtml web page] and mailed to a few people. This report step is run in the [[mu2epro]] account in $HOME/cron/val.


===Release build===
===Release build===
Line 18: Line 33:


<ol>
<ol>
<li>log onto Jenkins system. To do this procedure, you will need to be identified to Jenkins by a [[Authentication|cert]] loaded in your browser before you visit the site. The Jenkins page should have your username at the top right. If it says "anonymous", you are not authenticated.
<li>log onto Jenkins system. To do this procedure, you will need to be identified to Jenkins by a cert loaded in your browser before you visit the site. The Jenkins page should have your username at the top right. If it says "anonymous", you are not authenticated.
<li>browse to mu2e tab then mu2e-offline-build project
<li>browse to mu2e tab then mu2e-offline-build project
<li>click on "configure," go the bottom, in "execute shell" box.  Edit the tag name like:
<li>click on "configure," go the bottom, in "execute shell" box.  Edit the tag name like:
Line 33: Line 48:
===Integration build===
===Integration build===


This build will be triggered every time there is a git commit to the Offline repository. You can check the results by browsing the Jenkins system. Go to the "mu2e" tab, the "mu2e-offline-ci" project. If the balls are pulsing, the build is still running. If green, the build was clean. If red, then errors reported. Click on one of the builds (SLF6), then "last build", then "console output" or "view as plain text" to see the errors.  If there were errors, Jenkins will email the person who made the commit which triggered the build.  If a new commit fixes the build, the user will get a new "all OK" mail.
Once an hour, jenkin will check if there has been a new commit to our main git repository and if there was, it will run the mu2e-offline-ci project. This project builds prof and debug from the head. If the build fails, mail will be sent to the person who made the commit. You can also check the results by browsing the Jenkins system. Go to the "mu2e" tab, the "mu2e-offline-ci" project. If the balls are pulsing, the build is still running. If green, the build was clean. If red, then the build failed. Click on one of the builds, then "last build", then "console output" to see the log file.  
 


[[Category:Computing]]
[[Category:Computing]]
[[Category:Computing/Code]]
[[Category:Computing/Code]]
[[Category:Computing/CodeManagement]]
[[Category:Computing/CodeManagement]]

Revision as of 16:18, 15 February 2017

Introduction

Jenkins is a freeware java code build system that the Scientific Computing Division is maintaining for the experiments. It includes several powerful build machines where the code can be built using significant parallelism. It also has many useful management features. You can browse the Jenkins system. and docs for code managers.

Anyone can view the jenkins pages, but to edit the pages you need to put in a ticket to get edit permissions in Jenkins, then authorize yourself to the site with a certificate. To edit, the Jenkins page should have your username at the top right. If it says "anonymous", try deleting your "buildmaster" cookies, restarting the browser, check that your cert is loaded in the browser, and try again.

Running Projects

mu2e has these Jenkins projects:

  1. mu2e-offline-nightly builds every night and checks several jobs, geant volume overlaps, and validation. It produces a report which is mailed to a few people and archived here.
  2. mu2e-offline-build for building a tag of the offline code and producing tarballs suitable for moving the build to a code disk.
  3. mu2e-offline-ci runs every hour and if there was a recent git commit, then run a build which the developers can check for errors.
  4. mu2e-offline-geant-int builds every night to check that the future version of geant is still integrated

Most are driven by a set of scripts kept in the codetools repository and UPS product.

Nightly build

The mu2e-offline-nightly project checks out and builds the head every night at about 3AM. It then runs a series of checks:

  • 10 standard fcl jobs and checks that they have a good return code
  • a geometry overlap check
  • generates 5,000 events in genReco and produces a set of validation histograms
  • copies in a standard file and runs CutAndCount on it

The logs and histogram files are saved. The histograms for validation and CutAndCount are compared to the previous day's histograms and report is made. The results are posted on a web page and mailed to a few people. This report step is run in the mu2epro account in $HOME/cron/val.


Release build

The release build is triggered by hand when a new tag is ready.

  1. log onto Jenkins system. To do this procedure, you will need to be identified to Jenkins by a cert loaded in your browser before you visit the site. The Jenkins page should have your username at the top right. If it says "anonymous", you are not authenticated.
  2. browse to mu2e tab then mu2e-offline-build project
  3. click on "configure," go the bottom, in "execute shell" box. Edit the tag name like:
    export MU2E_RELEASE_TAG=v5_2_1

    or branch name like

    export MU2E_BRANCH=V5_2_1_test_branch

    at the top of the script. Click "save" at the bottom of this page. You should be on the project top page.

  4. Click "build now". It will take up to 1.5 hours if there are lots of other builds running on the build machines. When the status balls stop pulsing, it is done.
  5. Check logs by clicking on one of the status balls, then "last build" then "console output".
  6. Pull the releases to the code disk using CVMFS instructions
  7. If the tarball is needed for remote distribution, that can be added to the procedure, or it can be retrieved by hand from Jenkins.

Integration build

Once an hour, jenkin will check if there has been a new commit to our main git repository and if there was, it will run the mu2e-offline-ci project. This project builds prof and debug from the head. If the build fails, mail will be sent to the person who made the commit. You can also check the results by browsing the Jenkins system. Go to the "mu2e" tab, the "mu2e-offline-ci" project. If the balls are pulsing, the build is still running. If green, the build was clean. If red, then the build failed. Click on one of the builds, then "last build", then "console output" to see the log file.