From 7b51328424f8dbbde929b413dba07d76c2846a78 Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Tue, 26 Sep 2023 17:58:20 +0200 Subject: [PATCH] test: added an integration test --- .github/workflows/integration.yml | 54 +++++++++++++++++++++++++++++++ Pilot/pilotTools.py | 1 - 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/integration.yml diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 00000000..bafda96a --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,54 @@ +name: integration + +on: [push, pull_request] + +jobs: + integration: + runs-on: ubuntu-latest + + strategy: + matrix: + python: + - 2.7.18 + - 3.6.15 + - 3.9.17 + dirac_version: + - v8.0.29 + - v8.1.0a20 + + container: python:${{ matrix.python }}-slim + + steps: + - uses: actions/checkout@v4 + - name: Retrieve the secret and decode it to a file + env: + CERTIFICATE_BASE64: ${{ secrets.CERTIFICATE_BASE64 }} + run: | + echo $PWD + 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 + echo $HOSTCERT > etc/grid-security/hostcert.pem + echo $HOSTKEY > etc/grid-security/hostkey.pem + chmod 400 etc/grid-security/hostcert.pem + chmod 644 etc/grid-security/hostkey.pem + ls -al etc/grid-security + - name: tests + run: | + echo $PWD + cd Pilot + 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.cern.ch/g" pilot.json + sed -i "s/VAR_JENKINS_QUEUE/jenkins-queue_not_important/g" pilot.json + sed -i "s/VAR_DIRAC_VERSION/${{ matrix.dirac_version }}/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 + cat pilot.json + ls -al /__w/Pilot/Pilot/ + ls -al /__w/Pilot/Pilot/Pilot/ + ls -al /__w/Pilot/Pilot/Pilot/etc/ + ls -al /__w/Pilot/Pilot/Pilot/etc/grid-security + python dirac-pilot.py -M 1 -S DIRAC-Certification -N jenkins.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --cert --certLocation=/__w/Pilot/Pilot/Pilot/etc/grid-security --debug diff --git a/Pilot/pilotTools.py b/Pilot/pilotTools.py index f4889da2..6fd97d6a 100644 --- a/Pilot/pilotTools.py +++ b/Pilot/pilotTools.py @@ -17,7 +17,6 @@ import sys import threading from datetime import datetime -from distutils.version import LooseVersion from functools import partial ############################