From 2d4ebd419ba824d3d6e66306e809715830d7be91 Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Thu, 5 Oct 2023 14:05:42 +0200 Subject: [PATCH] test: added an LHCb integration test using vanilla Pilot install command --- .github/workflows/integration.yml | 38 +++++++++++++++++++++++++++++++ tests/CI/pilot_newSchema.json | 2 +- tests/CI/pilot_oldSchema.json | 16 +++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index c4060893..429af736 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -168,3 +168,41 @@ jobs: 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 --debug + + ext-lhcb_integration_dirac_installer: + runs-on: ubuntu-latest + + 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/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 + 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 + 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/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_d.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 --debug diff --git a/tests/CI/pilot_newSchema.json b/tests/CI/pilot_newSchema.json index 1d57c9f7..002deffc 100644 --- a/tests/CI/pilot_newSchema.json +++ b/tests/CI/pilot_newSchema.json @@ -77,7 +77,7 @@ "jenkins-lhcb-d.cern.ch": { "Site": "VAR_JENKINS_SITE", "GridCEType": "LHCbD" - } + } }, "GenericPilotDNs": [], "Defaults": { diff --git a/tests/CI/pilot_oldSchema.json b/tests/CI/pilot_oldSchema.json index a6aa2bdc..3bdadbfb 100644 --- a/tests/CI/pilot_oldSchema.json +++ b/tests/CI/pilot_oldSchema.json @@ -48,6 +48,18 @@ "LHCbConfigureSite", "LHCbConfigureArchitecture", "LHCbConfigureCPURequirements" + ], + "LHCbD": [ + "CheckWorkerNode", + "InstallDIRAC", + "LHCbConfigureBasics", + "RegisterPilot", + "CheckCECapabilities", + "LHCbAddCVMFSTags", + "CheckWNCapabilities", + "LHCbConfigureSite", + "LHCbConfigureArchitecture", + "LHCbConfigureCPURequirements" ] }, "Logging": { @@ -162,6 +174,10 @@ "jenkins-lhcb.cern.ch": { "Site": "VAR_JENKINS_SITE", "GridCEType": "LHCb" + }, + "jenkins-lhcb-d.cern.ch": { + "Site": "VAR_JENKINS_SITE", + "GridCEType": "LHCbD" } }, "DefaultSetup": "DIRAC-Certification"