MuseMaintenance
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/mu2e.opensciencegrid.org/Musings
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.
- locally, before running on Jenkins
- checkout the
Mu2e/MuseConfig
repo - read the instructions in
MuseConfig/musings/README.mk
- modify the appropriate file in
musings
directory - commit and merge (no tags needed, build is from the head)
- checkout the
- on Jenkins
- 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.
- browse to mu2e tab then mu2e-musing-build project
- click in "build with parameters"
- enter the musing name and tag
- click "build"
- check logs by clicking on one of the status balls, then "last build" then "console output".
- 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
- capture the link to the tarball with a right click
- log onto the cvmfs machine, and start a transaction
- cd to /cvmfs/mu2e.opensciencegrid.org/Musings/, wget the tarball, and extract it in this dir
- remove the tarball
- repeat for the debug tarball
- if needed, repoint the "Offline/current" link to this new tag
- cd into the directory for the musing you are installing
- rm current
- ln -s tag_name current
- cd ~ and publish the transaction
- once cvmfs is updated, test with
muse setup tag
The script that this project runs is in the codetools repo,
codetools/bin/jenkinsMusingBuild.sh
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
mu2einit git clone git@github.com:<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 museInstall.sh 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
mu2einit mu2eTest.sh -h