Skip to content

Commit

Permalink
test: added int tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Oct 27, 2023
1 parent a50a6b6 commit e281cfc
Show file tree
Hide file tree
Showing 3 changed files with 482 additions and 0 deletions.
136 changes: 136 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: integration

on: [push]

jobs:

ext-lhcb_integration:
runs-on: ubuntu-latest

strategy:
matrix:
pilot_schema:
- pilot_oldSchema.json
- pilot_newSchema.json

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

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

- name: Retrieve the secret and decode it to a file
env:
HOSTCERT_BASE64: ${{ secrets.HOSTCERT_BASE64 }}
HOSTKEY_BASE64: ${{ secrets.HOSTKEY_BASE64 }}
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
chmod 440 etc/grid-security/hostcert.pem
chmod 400 etc/grid-security/hostkey.pem
- name: tests
env:
X509_CERT_DIR: /cvmfs/lhcb.cern.ch/etc/grid-security/certificates
X509_VOMS_DIR: /cvmfs/lhcb.cern.ch/etc/grid-security/vomsdir
DIRAC_VOMSES: /cvmfs/lhcb.cern.ch/etc/grid-security/vomses
run: |
cd Pilot
export VO_LHCB_SW_DIR=${GITHUB_WORKSPACE}/Pilot
curl https://lhcbdirac.s3.cern.ch/Pilot3/LHCbPilotCommands.py -o LHCbPilotCommands.py
cp ../tests/CI/${{ matrix.pilot_schema }} 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/v11.0.20/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
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 --wnVO=LHCb -o lbRunOnly --debug
# ext-lhcb_integration_dirac_installer_no_env:
# runs-on: ubuntu-latest

# strategy:
# matrix:
# pilot_schema:
# - pilot_oldSchema.json
# - pilot_newSchema.json
# ce:
# - jenkins-lhcb-d.cern.ch
# - jenkins-lhcb-dd.cern.ch

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

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

# - name: Retrieve the secret and decode it to a file
# env:
# HOSTCERT_BASE64: ${{ secrets.HOSTCERT_BASE64 }}
# HOSTKEY_BASE64: ${{ secrets.HOSTKEY_BASE64 }}
# 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
# chmod 440 etc/grid-security/hostcert.pem
# chmod 400 etc/grid-security/hostkey.pem
# - name: tests
# run: |
# cd Pilot
# curl https://lhcbdirac.s3.cern.ch/Pilot3/LHCbPilotCommands.py -o LHCbPilotCommands.py
# cp ../tests/CI/${{ matrix.pilot_schema }} pilot.json
# sed -i "s/VAR_JENKINS_SITE/DIRAC.Jenkins.ch/g" pilot.json
# sed -i "s/VAR_JENKINS_CE/${{ matrix.ce }}/g" pilot.json
# sed -i "s/VAR_JENKINS_QUEUE/jenkins-queue_not_important/g" pilot.json
# sed -i "s/VAR_DIRAC_VERSION/v11.0.20/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
# python dirac-pilot.py -M 1 -S DIRAC-Certification -N ${{ matrix.ce }} -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch -e LHCb -l LHCb -E LHCbPilot --preinstalledEnvPrefix=/cvmfs/lhcb.cern.ch/lhcbdirac/ --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --wnVO=LHCb -o cvmfsOnly --debug

# ext-lhcb_integration_no_env_devel:
# runs-on: ubuntu-latest

# strategy:
# matrix:
# pilot_schema:
# - pilot_oldSchema.json
# - pilot_newSchema.json

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

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

# - name: Retrieve the secret and decode it to a file
# env:
# HOSTCERT_BASE64: ${{ secrets.HOSTCERT_BASE64 }}
# HOSTKEY_BASE64: ${{ secrets.HOSTKEY_BASE64 }}
# 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
# chmod 440 etc/grid-security/hostcert.pem
# chmod 400 etc/grid-security/hostkey.pem
# - name: tests
# run: |
# cd Pilot
# curl https://gitlab.cern.ch/fstagni/LHCbPilot/-/raw/refactor_1/LHCbPilot/LHCbPilotCommands.py -o LHCbPilotCommands.py
# cp ../tests/CI/${{ matrix.pilot_schema }} pilot.json
# sed -i "s/VAR_JENKINS_SITE/DIRAC.Jenkins.ch/g" pilot.json
# sed -i "s/VAR_JENKINS_CE/jenkins-lhcb-d.cern.ch/g" pilot.json
# sed -i "s/VAR_JENKINS_QUEUE/jenkins-queue_not_important/g" pilot.json
# sed -i "s/VAR_DIRAC_VERSION/v11.0.20/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
# 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 --preinstalledEnvPrefix=/cvmfs/lhcb.cern.ch/lhcbdirac/ --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --wnVO=LHCb -o cvmfsOnly --debug
146 changes: 146 additions & 0 deletions tests/CI/pilot_newSchema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{
"timestamp": "2023-02-13T14:34:26.725499",
"CEs": {
"jenkins.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"GridCEType": "TEST"
},
"jenkins-full.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"GridCEType": "TEST-FULL"
},
"jenkins-mp.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"GridCEType": "TEST-MP"
},
"jenkins-mp-full.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"GridCEType": "TEST-FULL"
},
"jenkins-singularity.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"GridCEType": "TEST",
"LocalCEType": "Singularity",
"InstallDIRACInContainer": "True"
},
"jenkins-singularity-full.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"GridCEType": "TEST-FULL",
"LocalCEType": "Singularity"
},
"jenkins-mp-pool.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"Queue": "VAR_JENKINS_QUEUE",
"GridCEType": "TEST-MP",
"LocalCEType": "Pool"
},
"jenkins-mp-pool-full.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"GridCEType": "TEST-FULL",
"LocalCEType": "InProcess",
"VAR_JENKINS_QUEUE": {
"LocalCEType": "Pool"
}
},
"jenkins-mp-pool-sudo.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"GridCEType": "TEST-MP",
"VAR_JENKINS_QUEUE": {
"LocalCEType": "Pool/Sudo"
}
},
"jenkins-mp-pool-sudo-full.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"GridCEType": "TEST-FULL",
"VAR_JENKINS_QUEUE": {
"LocalCEType": "Pool/Sudo"
}
},
"jenkins-mp-pool-singularity.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"GridCEType": "TEST-MP",
"VAR_JENKINS_QUEUE": {
"LocalCEType": "Pool/Singularity"
}
},
"jenkins-mp-pool-singularity-full.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"GridCEType": "TEST-FULL",
"VAR_JENKINS_QUEUE": {
"LocalCEType": "Pool/Singularity"
}
},
"jenkins-lhcb.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"GridCEType": "LHCb"
},
"jenkins-lhcb-d.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"GridCEType": "LHCbD"
},
"jenkins-lhcb-dd.cern.ch": {
"Site": "VAR_JENKINS_SITE",
"GridCEType": "LHCbDD"
}
},
"Defaults": {
"Pilot": {
"RemoteLogging": "False",
"Commands": {
"TEST": "CheckWorkerNode, InstallDIRAC, ConfigureBasics, RegisterPilot, CheckCECapabilities, CheckWNCapabilities, ConfigureSite, ConfigureArchitecture, ConfigureCPURequirements",
"TEST-MP": "CheckWorkerNode, InstallDIRAC, ConfigureBasics, RegisterPilot, CheckCECapabilities, CheckWNCapabilities, ConfigureSite, ConfigureArchitecture, ConfigureCPURequirements",
"TEST-FULL": "CheckWorkerNode, InstallDIRAC, ConfigureBasics, RegisterPilot, CheckCECapabilities, CheckWNCapabilities, ConfigureSite, ConfigureArchitecture, ConfigureCPURequirements, LaunchAgent",
"LHCb": "CheckWorkerNode, LHCbInstallDIRAC, LHCbConfigureBasics, RegisterPilot, CheckCECapabilities, LHCbAddCVMFSTags, CheckWNCapabilities, LHCbConfigureSite, LHCbConfigureArchitecture, LHCbConfigureCPURequirements",
"LHCbD": "CheckWorkerNode, InstallDIRAC, LHCbConfigureBasics, RegisterPilot, CheckCECapabilities, LHCbAddCVMFSTags, CheckWNCapabilities, LHCbConfigureSite, LHCbConfigureArchitecture, LHCbConfigureCPURequirements",
"LHCbDD": "CheckWorkerNode, InstallDIRAC, ConfigureBasics, RegisterPilot, CheckCECapabilities, LHCbAddCVMFSTags, CheckWNCapabilities, ConfigureSite, LHCbConfigureArchitecture, ConfigureCPURequirements"
}
}
},
"gridpp": {
"Pilot": {
"Version": "VAR_DIRAC_VERSION",
"Extensions": "None",
"CheckVersion": "False",
"pilotFileServer": "lbvobox70.cern.ch:8443",
"pilotRepoBranch": "does_not_matter",
"pilotRepo": "https://github.com/does_not_matter/Pilot.git",
"GenericPilotGroup": "gridpp_pilot",
"GenericPilotDN": "VAR_USERDN_GRIDPP",
"RemoteLogging": "False",
"RemoteLoggerURL": "https://lbvobox70.cern.ch:8443/WorkloadManagement/TornadoPilotLogging",
"UploadSE": "UKI-LT2-IC-HEP-disk",
"UploadPath": "/gridpp/pilotlogs/",
"LoggingShifterName": "GridPPLogManager",
"PilotLogLevel": "DEBUG"
}
},
"dteam": {
"Pilot": {
"Version": "VAR_DIRAC_VERSION",
"CheckVersion": "True",
"pilotFileServer": "lbvobox70.cern.ch:8443",
"pilotRepoBranch": "should_not_matter",
"pilotRepo": "https://github.com/should_not_matter/Pilot.git",
"GenericPilotGroup": "dteam_pilot",
"GenericPilotDN": "VAR_USERDN",
"RemoteLogging": "False",
"RemoteLoggerURL": "https://lbvobox70.cern.ch:8443/WorkloadManagement/TornadoPilotLogging",
"PilotLogLevel": "DEBUG"
}
},
"LHCb": {
"Pilot": {
"Version": "VAR_DIRAC_VERSION",
"CheckVersion": "True",
"pilotFileServer": "lbvobox70.cern.ch:8443",
"GenericPilotGroup": "dteam_pilot",
"GenericPilotDN": "VAR_USERDN",
"RemoteLogging": "False",
"RemoteLoggerURL": "https://lbvobox70.cern.ch:8443/WorkloadManagement/TornadoPilotLogging",
"PilotLogLevel": "DEBUG"
}
},
"ConfigurationServers": [
"VAR_CS"
]
}
Loading

0 comments on commit e281cfc

Please sign in to comment.