Skip to content

Commit

Permalink
Merge pull request #5 from katilp/add-setup
Browse files Browse the repository at this point in the history
Update workflow_test.sh
  • Loading branch information
katilp authored Jun 27, 2021
2 parents a3b40f0 + 469846d commit 58a05cd
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test_workflow:
runs-on: ubuntu-latest
Expand Down
37 changes: 31 additions & 6 deletions workflow_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
# parameters: $1 package, $2 branch, $3 configuration file with path from package root
# $4 GlobalTag $ GitHub organization/owner
sudo chown $USER /mnt/vol
pwd
#cd ~/CMSSW_5_3_32/src/
#source /opt/cms/cmsset_default.sh
#source /opt/cms/entrypoint.sh
which git
git --version

echo Update paths:
echo $UPDATE_PATH
echo $LD_LIBRARY_PATH
Expand All @@ -18,3 +13,33 @@ which git
git --version

ls /cvmfs/cms-opendata-conddb.cern.ch

if [ -z "$1" ]; then package=TriggerInfoTool; else package=$1; fi
if [ -z "$2" ]; then branch=2011; else branch=$2; fi
if [ -z "$3" ]; then config=GeneralInfoAnalyzer/python/triggerinfoanalyzer_cfg.py; else config=$3; fi
if [ -z "$4" ]; then globaltag=FT_53_LV5_AN1; else globaltag=$4; fi
if [ -z "$5" ]; then gitdir=cms-opendata-analyses; else gitdir=$5; fi

dbfile="$globaltag".db

# Set up area

git clone -b $branch https://github.com/$gitdir/$package.git
cd $package/
scram b
mkdir $globaltag

# Prepare the initial main db file and the full dump

curl https://raw.githubusercontent.com/katilp/condition-data-test/main/base_dump.txt > base_dump.txt
sed -i 's/replacethis/'$globaltag'/g' base_dump.txt
cat base_dump.txt | sqlite3 $dbfile
sqlite3 /cvmfs/cms-opendata-conddb.cern.ch/$globaltag.db .dump > original.txt

cp /mnt/vol/find_db.sh .
#curl https://raw.githubusercontent.com/katilp/condition-data-test/main/find_db.sh > find_db.sh

# FIXME: make this configurable
curl https://raw.githubusercontent.com/katilp/condition-data-test/main/trigger_2011_cfg.py ">" $package/$config

ls -l

0 comments on commit 58a05cd

Please sign in to comment.