Skip to content

Commit

Permalink
test: pilot tests with extended pilots
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Apr 24, 2024
1 parent 08c6656 commit b2758f7
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 44 deletions.
38 changes: 37 additions & 1 deletion tests/.dirac-ci-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
config:
DIRAC_CI_SETUP_SCRIPT: DIRAC/tests/Jenkins/dirac_ci.sh
PILOT_INSTALLATION_COMMAND: 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
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\"
]
}"

# List of feature variables which must be passed when preparing
required-feature-flags: []
Expand All @@ -9,4 +42,7 @@ extra-services: {}

# Additional shell commands to run
commands:
post-prepare: []
post-prepare:
- git clone --single-branch -b master https://github.com/DIRACGrid/Pilot.git
- mv Pilot/Pilot/*.py .
- rm -rf Pilot
48 changes: 5 additions & 43 deletions tests/CI/run_pilot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ set -eo pipefail
# IFS=$'\n\t'
set -x

# shellcheck disable=SC2034
TESTCODE=$PWD/LocalRepo/ALTERNATIVE_MODULES/
PILOTINSTALLDIR=$PWD/PilotInstallDIR/

Expand All @@ -20,48 +21,7 @@ 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

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}" | jq . > pilot.json

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

more pilot.json

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

$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
$py "${PILOT_INSTALLATION_COMMAND}"

0 comments on commit b2758f7

Please sign in to comment.