From Mu2eWiki
Jump to navigation Jump to search

Publishing Musings

Musings are various sets of Muse-ready repos built together and published on cvmfs. There they can then be accessed by "muse setup". This Jenkins musing build is used to build code with the Muse system, and produce a build tarball, ready to be installed in the cvmfs /cvmfs/ area. In this build, Jenkins is configured to build prof and debug in parallel, and produce a tarball for each.

Some Musings we are currently (2022) supporting:

  • Offline - contains only a build of a tag of the Offline repo
  • SimJob - contains Production repo and has a backing link to an Offline Musing
  • TrkAna - contains the TrkAna repo and has a backing link to a SimJob

Here is the recipe for building and installing a musing.

  1. locally, before running on Jenkins
    1. checkout the Mu2e/MuseConfig repo
    2. read the instructions in MuseConfig/musings/
    3. modify the appropriate file in musings directory
    4. commit and merge (no tags needed, build is from the head)
  2. on Jenkins
    1. log onto Jenkins system. 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-musing-build project
    3. click in "build with parameters"
    4. enter the musing name and tag
    5. click "build"
    6. check logs by clicking on one of the status balls, then "last build" then "console output".
    7. when jenkins indicates done (solid status icons), click into the build and there will be a link to the tarball as the "build artifacts" from the build process
    8. capture the link to the tarball with a right click
  3. log onto the cvmfs machine, and start a transaction
    1. cd to /cvmfs/, wget the tarball, and extract it in this dir
    2. remove the tarball
    3. repeat for the debug tarball
    4. if needed, repoint the "Offline/current" link to this new tag
      1. cd into the directory for the musing you are installing
      2. rm current
      3. ln -s tag_name current
    5. cd ~ and publish the transaction
    6. once cvmfs is updated, test with muse setup tag

The script that this project runs is in the codetools repo,


When the Jenkins project is run, it checks out the head of codetools to find the script.

Publishing Muse itself

To develop Muse, create a fork in your github account, check it out locally

setup mu2e
git clone<your GitHub username>/Muse

and to use this local code instead of "setup muse" do

export MUSE_DIR=$PWD/Muse
export PATH=$PWD/Muse/bin:$PATH
export MUSE_ENVSET_DIR=$PWD/Muse/config
alias muse="source muse"

now you can add envsets and test them directly (as opposed to the muse/uNNN mechanism). All the scripts should work like a normal Muse UPS setup. Develop and commit, pull and tag changes as in any other github repo. To publish tag,

mkdir products tag ./products

the products directory will contain an UPS-installed version tag, and a tarball suitable to uploading to cvmfs artproducts area. This script does not checkout or attempt to confirm that the tag is correct, it is assuming the code is actually equivalent to the tagged code. To make the new version UPS-current, edit the version number into the file under the Muse/current.chain directory on cvmfs. You don't need a debug version because this is UPS, which has a NULL product qualifier. For some reason I started using the version number pattern vN_NN_NN, maybe following art.

Testing Muse

Muse contains a series of tests than can be run by hand or as a Jenkins project (mu2e_muse_test). The script can be run locally with

setup mu2e -h