diff --git a/.github/workflows/submitAndMatch.yml b/.github/workflows/submitAndMatch.yml new file mode 100644 index 00000000000..ca208d55a49 --- /dev/null +++ b/.github/workflows/submitAndMatch.yml @@ -0,0 +1,50 @@ +name: submitAndMatch + +on: [push, pull_request] + +jobs: + submitAndMatch: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: cvmfs-contrib/github-action-cvmfs@v3 + + - name: Test CernVM-FS + run: ls /cvmfs/dirac.egi.eu + + - name: Checkout Pilot repo + uses: actions/checkout@v4 + with: + repository: DIRACGrid/Pilot + path: Pilot + + - name: Retrieve the secret and decode it to a file + env: + HOSTCERT_BASE64: ${{ secrets.HOSTCERT_BASE64 }} + HOSTKEY_BASE64: ${{ secrets.HOSTKEY_BASE64 }} + run: | + cd Pilot/Pilot + ls -l + 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 + chmod 440 etc/grid-security/hostcert.pem + chmod 400 etc/grid-security/hostkey.pem + + - name: tests + run: | + cd Pilot/Pilot + ls -l + cp ../tests/CI/pilot_newSchema.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/integration/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 + g_job="${{ github.actor }}${{ github.ref }}${GITHUB_JOB//-/}" + pilotUUID="${g_job//_/}""$(shuf -i 2000-65000 -n 1)" + pilotUUID=$(echo $pilotUUID | rev | cut -c 1-32 | rev) + python dirac-pilot.py --modules https://github.com/DIRACGrid/DIRAC.git:::DIRAC:::${{ github.ref }} -M 1 -S DIRAC-Certification -N jenkins.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --cert --certLocation=${GITHUB_WORKSPACE}/Pilot/etc/grid-security --wnVO=dteam --pilotUUID="${pilotUUID}" --debug