DUNE-DAQ / daq-buildtools

Make life for developers easier through a collection of CMake functions and scripts
0 stars 1 forks source link

Add `DUNE_DAQ_RELEASE_SOURCE` environment variable to `dbt-create` #279

Closed andrewmogan closed 5 months ago

andrewmogan commented 5 months ago

This PR, in combination with DUNE-DAQ/daq-release#381, implements the environment variable DUNE_DAQ_RELEASE_SOURCE, which points to a directory on /cvmfs containing the sourcecode used in the created release. Example usage:

source /cvmfs/dunedaq.opensciencegrid.org/setup_dunedaq.sh
git clone https://github.com/DUNE-DAQ/daq-buildtools.git -b amogan/daq_release_issue375
source daq-buildtools/env.sh
dbt-create -n NFDT_DEV_240624_A9 test_new_dbt # Test nightly created using the modified workflows in the linked PR above
cd test_new_dbt && source env.sh
echo $DUNE_DAQ_RELEASE_SOURCE

The last command outputs

/cvmfs/dunedaq-development.opensciencegrid.org/nightly/NFDT_DEV_240624_A9/sourcecode

and an ls in that directory shows all relevant packages.

In the case where the sourcecode directory does not exist, dbt-create will print a warning and DUNE_DAQ_RELEASE_SOURCE will still be set to the non-existent sourcecode area:

WARNING The environment variable DUNE_DAQ_RELEASE_SOURCE has been set to
        /cvmfs/dunedaq-development.opensciencegrid.org/nightly/NFD_DEV_240620_A9/sourcecode,
        but this path does not exist.
jcfreeman2 commented 5 months ago

I think this looks great. One additional idea: how about if the location provided by the environment variable be printed by dbt-info sourcecode? I.e., when you run the command, you see something like this:

dfmodules: develop
fdreadoutlibs: develop

All other packages' sourcecode in /cvmfs/dunedaq-development.opensciencegrid.org/nightly/NFDT_DEV_240624_A9/sourcecode