Skip to content

Commit

Permalink
Merge pull request #7593 from fstagni/pilot_tests_extend
Browse files Browse the repository at this point in the history
test: pilot tests with extended pilots
  • Loading branch information
fstagni committed Apr 30, 2024
2 parents 37ed457 + 6f546d8 commit 76d15cf
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 48 deletions.
34 changes: 34 additions & 0 deletions tests/.dirac-ci-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
config:
DIRAC_CI_SETUP_SCRIPT: DIRAC/tests/Jenkins/dirac_ci.sh
PILOT_INSTALLATION_COMMAND: dirac-pilot.py --modules /home/dirac/LocalRepo/ALTERNATIVE_MODULES/DIRAC -M 1 -S dirac-JenkinsSetup -N jenkins.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --pilotUUID=whatever12345 --cert --certLocation=/home/dirac/PilotInstallDIR/etc/grid-security --CVMFS_locations=/home/dirac/PilotInstallDIR -o diracInstallOnly --wnVO=vo --debug
PILOT_JSON: "{
\"timestamp\": \"2023-02-13T14:34:26.725499\",
\"CEs\": {
\"jenkins.cern.ch\": {
\"Site\": \"DIRAC.Jenkins.ch\",
\"GridCEType\": \"TEST-FULL\"
}
},
\"Defaults\": {
\"Pilot\": {
\"RemoteLogging\": \"False\",
\"Version\": \"integration\",
\"Commands\": {
\"TEST-FULL\": \"CheckWorkerNode, InstallDIRAC, ConfigureBasics, RegisterPilot, CheckCECapabilities, CheckWNCapabilities, ConfigureSite, ConfigureArchitecture, ConfigureCPURequirements, LaunchAgent\"
}
}
},
\"vo\": {
\"Pilot\": {
\"CheckVersion\": \"False\",
\"pilotFileServer\": \"should_not_matter\",
\"pilotRepoBranch\": \"should_not_matter\",
\"pilotRepo\": \"https://github.com/should_not_matter/Pilot.git\",
\"GenericPilotGroup\": \"dirac_user\",
\"GenericPilotDN\": \"/C=ch/O=DIRAC/OU=DIRAC CI/CN=ciuser\",
\"PilotLogLevel\": \"DEBUG\"
}
},
\"ConfigurationServers\": [
\"https://server:9135/Configuration/Server\"
]
}"
PILOT_DOWNLOAD_COMMAND: "git clone --single-branch --branch master https://github.com/DIRACGrid/Pilot.git && mv Pilot/Pilot/*.py . && rm -rf Pilot"

# List of feature variables which must be passed when preparing
required-feature-flags: []
Expand Down
54 changes: 6 additions & 48 deletions tests/CI/run_pilot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,18 @@ set -eo pipefail
# IFS=$'\n\t'
set -x

TESTCODE=$PWD/LocalRepo/ALTERNATIVE_MODULES/
PILOTINSTALLDIR=$PWD/PilotInstallDIR/

source CONFIG

# Creating "the worker node"
cd "${PILOTINSTALLDIR}"
cd /home/dirac/PilotInstallDIR
mkdir -p etc/grid-security/vomsdir
mkdir -p etc/grid-security/vomses
touch etc/grid-security/vomsdir/vomsdir
touch etc/grid-security/vomses/vomses

# Get the pilot code
git clone --single-branch -b master https://github.com/DIRACGrid/Pilot.git
mv Pilot/Pilot/*.py .
rm -rf Pilot

# shellcheck disable=SC2034
CSURL=https://$SERVER_HOST:9135/Configuration/Server
eval "${PILOT_DOWNLOAD_COMMAND}"

echo "
{
\"timestamp\": \"2023-02-13T14:34:26.725499\",
\"CEs\": {
\"jenkins.cern.ch\": {
\"Site\": \"DIRAC.Jenkins.ch\",
\"GridCEType\": \"TEST-FULL\"
}
},
\"Defaults\": {
\"Pilot\": {
\"RemoteLogging\": \"False\",
\"Version\": \"integration\",
\"Commands\": {
\"TEST-FULL\": \"CheckWorkerNode, InstallDIRAC, ConfigureBasics, RegisterPilot, CheckCECapabilities, CheckWNCapabilities, ConfigureSite, ConfigureArchitecture, ConfigureCPURequirements, LaunchAgent\"
}
}
},
\"vo\": {
\"Pilot\": {
\"CheckVersion\": \"False\",
\"pilotFileServer\": \"should_not_matter\",
\"pilotRepoBranch\": \"should_not_matter\",
\"pilotRepo\": \"https://github.com/should_not_matter/Pilot.git\",
\"GenericPilotGroup\": \"dirac_user\",
\"GenericPilotDN\": \"/C=ch/O=DIRAC/OU=DIRAC CI/CN=ciuser\",
\"PilotLogLevel\": \"DEBUG\"
}
},
\"ConfigurationServers\": [
\"${CSURL}\"
]
}
" > pilot.json
echo "${PILOT_JSON}" > pilot.json

if command -v python &> /dev/null; then
py='python'
Expand All @@ -71,7 +29,7 @@ elif command -v python2 &> /dev/null; then
py='python2'
fi

pilotUUID="${GITHUB_JOB//-/}""$(shuf -i 2000-65000 -n 1)"
pilotUUID=$(echo "$pilotUUID" | rev | cut -c 1-32 | rev)
more pilot.json

$py dirac-pilot.py --modules "${TESTCODE}/DIRAC" -M 1 -S dirac-JenkinsSetup -N jenkins.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --pilotUUID="${pilotUUID}" --cert --certLocation="${PILOTINSTALLDIR}"/etc/grid-security --CVMFS_locations="${PILOTINSTALLDIR}" -o diracInstallOnly --wnVO=vo --debug
# shellcheck disable=SC2086
$py ${PILOT_INSTALLATION_COMMAND}

0 comments on commit 76d15cf

Please sign in to comment.