Skip to content

Commit

Permalink
test: added LHCbPilot integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Oct 5, 2023
1 parent ef7f9aa commit 41cc82b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 23 deletions.
47 changes: 24 additions & 23 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: integration

on: [push, pull_request]
on: [push]

jobs:
integration:
Expand All @@ -27,10 +27,11 @@ jobs:
run: |
cd Pilot
mkdir -p etc/grid-security
echo $HOSTCERT_BASE64 | base64 --decode > etc/grid-security/hostcert.pem
echo $HOSTKEY_BASE64 | base64 --decode > etc/grid-security/hostkey.pem
echo "$HOSTCERT_BASE64" | base64 --decode > etc/grid-security/hostcert.pem
echo "$HOSTKEY_BASE64" | base64 --decode > etc/grid-security/hostkey.pem
chmod 440 etc/grid-security/hostcert.pem
chmod 400 etc/grid-security/hostkey.pem
ls -l etc/grid-security
- name: tests
run: |
cd Pilot
Expand All @@ -45,12 +46,19 @@ jobs:
python dirac-pilot.py --modules https://github.com/DIRACGrid/DIRAC.git:::DIRAC:::${{ matrix.dirac_version }} -M 1 -S DIRAC-Certification -N jenkins.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --debug
cat pilot.cfg
matching:
runs-on: ubuntu-latest

container: python:3.9.17-slim

strategy:
matrix:
python:
- 2.7.18
- 3.6.15
- 3.9.17

container: python:${{ matrix.python }}-slim

steps:
- uses: actions/checkout@v4
- name: Retrieve the secret and decode it to a file
Expand All @@ -60,8 +68,8 @@ jobs:
run: |
cd Pilot
mkdir -p etc/grid-security
echo $HOSTCERT_BASE64 | base64 --decode > etc/grid-security/hostcert.pem
echo $HOSTKEY_BASE64 | base64 --decode > etc/grid-security/hostkey.pem
echo "$HOSTCERT_BASE64" | base64 --decode > etc/grid-security/hostcert.pem
echo "$HOSTKEY_BASE64" | base64 --decode > etc/grid-security/hostkey.pem
chmod 440 etc/grid-security/hostcert.pem
chmod 400 etc/grid-security/hostkey.pem
- name: tests
Expand Down Expand Up @@ -90,15 +98,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: cvmfs-contrib/github-action-cvmfs@v3

- name: Test CernVM-FS
run: ls /cvmfs/lhcb.cern.ch

- name: add cvmfs
run: |
wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb
sudo dpkg -i cvmfs-release-latest_all.deb
rm -f cvmfs-release-latest_all.deb
sudo apt-get update
sudo apt-get install cvmfs
sudo cvmfs_config setup
- name: Retrieve the secret and decode it to a file
env:
HOSTCERT_BASE64: ${{ secrets.HOSTCERT_BASE64 }}
Expand All @@ -108,25 +112,22 @@ jobs:
mkdir -p etc/grid-security/vomses
mkdir -p etc/grid-security/vomsdir
mkdir -p etc/grid-security/certificates
echo $HOSTCERT_BASE64 | base64 --decode > etc/grid-security/hostcert.pem
echo $HOSTKEY_BASE64 | base64 --decode > etc/grid-security/hostkey.pem
echo "$HOSTCERT_BASE64" | base64 --decode > etc/grid-security/hostcert.pem
echo "$HOSTKEY_BASE64" | base64 --decode > etc/grid-security/hostkey.pem
chmod 440 etc/grid-security/hostcert.pem
chmod 400 etc/grid-security/hostkey.pem
- name: tests
run: |
cd Pilot
export VO_LHCB_SW_DIR=${GITHUB_WORKSPACE}/Pilot
echo $VO_LHCB_SW_DIR
curl https://lhcbdirac.s3.cern.ch/Pilot3/LHCbPilotCommands.py -o LHCbPilotCommands.py
cp ../tests/CI/pilot_oldSchema.json pilot.json
sed -i "s/VAR_JENKINS_SITE/DIRAC.Jenkins.ch/g" pilot.json
sed -i "s/VAR_JENKINS_CE/jenkins-lhcb.cern.ch/g" pilot.json
sed -i "s/VAR_JENKINS_QUEUE/jenkins-queue_not_important/g" pilot.json
sed -i "s/VAR_DIRAC_VERSION/master/g" pilot.json
sed -i "s/VAR_DIRAC_VERSION//g" pilot.json
sed -i "s#VAR_CS#https://lbcertifdirac70.cern.ch:9135/Configuration/Server#g" pilot.json
sed -i "s#VAR_USERDN#/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=alboyer/CN=819281/CN=Alexandre Franck Boyer#g" pilot.json
sed -i "s#VAR_USERDN_GRIDPP#${DIRACUSERDN_GRIDPP}#g" pilot.json
ls -al
python dirac-pilot.py --modules https://gitlab.cern.ch/lhcb-dirac/LHCbDIRAC.git:::LHCbDIRAC:::master -M 1 -S DIRAC-Certification -N jenkins-lhcb.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch -e LHCb -l LHCb -E LHCbPilot --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --debug
cat pilot.cfg
echo $SHELL
python dirac-pilot.py -M 1 -S DIRAC-Certification -N jenkins-lhcb.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch -e LHCb -l LHCb -E LHCbPilot --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --debug
16 changes: 16 additions & 0 deletions tests/CI/pilot_oldSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@
"ConfigureArchitecture",
"ConfigureCPURequirements",
"LaunchAgent"
],
"LHCb": [
"CheckWorkerNode",
"LHCbInstallDIRAC",
"LHCbConfigureBasics",
"RegisterPilot",
"CheckCECapabilities",
"LHCbAddCVMFSTags",
"CheckWNCapabilities",
"LHCbConfigureSite",
"LHCbConfigureArchitecture",
"LHCbConfigureCPURequirements"
]
},
"Logging": {
Expand Down Expand Up @@ -146,6 +158,10 @@
"VAR_JENKINS_QUEUE": {
"LocalCEType": "Pool/Singularity"
}
},
"jenkins-lhcb.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"GridCEType": "LHCb"
}
},
"DefaultSetup": "DIRAC-Certification"
Expand Down

0 comments on commit 41cc82b

Please sign in to comment.