Putting It All Together: Final Run with CAT Services
Last updated on 2025-12-23 | Edit this page
Overview
Questions
- How do I combine CMSSW compilation, data access, and authentication into a single CI/CD pipeline?
- What are the trade-offs between using personal grid credentials versus CAT services?
- How can I use both CAT EOS and VOMS proxy services in the same pipeline?
Objectives
- Create a complete
.gitlab-ci.ymlpipeline that compiles CMSSW, obtains authentication, and runs analysis on EOS data. - Implement data access using either CAT EOS file service or CAT VOMS proxy service.
- Compare and choose between personal credentials and CAT services based on your workflow.
Putting It All Together: Final Run with CAT Services
In this final episode, you will combine everything you’ve learned to build a complete GitLab CI/CD pipeline that runs a CMSSW analysis using CAT services for data access and authentication. Your pipeline will include:
- Set up the CMSSW environment — Configure CMSSW version and environment variables.
- Obtain authentication — Use CAT services or personal grid credentials for CMS resource access.
- Access CMS data on EOS — Read input datasets via XRootD.
- Run the CMSSW analysis — Execute analysis code on input data.
- Validate output — Store and review analysis results.
Accessing Files on EOS via XRootD
Most analyses run on centrally produced files stored on EOS. To access them, you need a valid grid proxy for the CMS Virtual Organisation (VO).
We have already used EOS files in previous lessons. For this final example, we’ll explicitly define and use a single file from the DYJetsToLL dataset.
A copy is stored permanently on EOS at:
OUTPUT
/eos/cms/store/group/cat/datasets/MINIAODSIM/RunIISummer20UL17MiniAODv2-106X_mc2017_realistic_v9-v2/DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8/2C5565D7-ADE5-2C40-A0E5-BDFCCF40640E.root
Test Locally First
Before running in CI, test file access on your local machine:
BASH
cd ${CMSSW_BASE}/src/AnalysisCode/ZPeakAnalysis/
cmsRun test/MyZPeak_cfg.py inputFiles=/store/group/cat/datasets/MINIAODSIM/RunIISummer20UL17MiniAODv2-106X_mc2017_realistic_v9-v2/DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8/2C5565D7-ADE5-2C40-A0E5-BDFCCF40640E.root
ls -l myZPeak.root
This verifies your grid proxy and data access setup before committing to CI.
Three Approaches: Complete Examples
We show three different approaches to running your analysis in CI. Choose the one that best fits your use case.
Challenge: Create Your Complete Pipeline
Challenge
Choose one of the three approaches above and implement a complete
.gitlab-ci.yml file that:
- Compiles your CMSSW analysis code.
- Obtains authentication (using your chosen method).
- Runs the analysis on the example file.
- Validates the output.
Commit and push to GitLab, then check the CI/CD > Pipelines page to see it run. What happens? Did it succeed?
Congratulations! You have now built a complete, production-ready CI/CD pipeline for CMS analysis using GitLab. You can extend this pattern to multiple datasets, batch processing, and complex workflows.