diff --git a/tests/.dirac-ci-config.yaml b/tests/.dirac-ci-config.yaml index e55e40091b3..126e8a12a65 100644 --- a/tests/.dirac-ci-config.yaml +++ b/tests/.dirac-ci-config.yaml @@ -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: [] diff --git a/tests/CI/run_pilot.sh b/tests/CI/run_pilot.sh index 4315ac83b83..d6f55fade97 100755 --- a/tests/CI/run_pilot.sh +++ b/tests/CI/run_pilot.sh @@ -8,60 +8,25 @@ set -eo pipefail # IFS=$'\n\t' set -x -TESTCODE=$PWD/LocalRepo/ALTERNATIVE_MODULES/ -PILOTINSTALLDIR=$PWD/PilotInstallDIR/ +# Install jq +# if ! command -v jq &> /dev/null +# then +# sudo yum install -y jq +# fi 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 +eval "${PILOT_DOWNLOAD_COMMAND}" -# 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 +echo "${PILOT_JSON}" > pilot.json if command -v python &> /dev/null; then py='python' @@ -71,7 +36,6 @@ 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 +$py ${PILOT_INSTALLATION_COMMAND}