Skip to content

Commit

Permalink
test: use REST APIs to get the latest releases
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Nov 10, 2023
1 parent 91949a8 commit 6d9ec7c
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
dirac_version:
- rel-v8r0
- echo $(curl -s "https://api.github.com/repos/DIRACGrid/DIRAC/branches") | jq -r '.[].name' | sort -V | grep 'rel-' | tail -n 1
- integration
pilot_schema:
- pilot_oldSchema.json
Expand Down Expand Up @@ -62,8 +62,8 @@ jobs:
- pilot_oldSchema.json
- pilot_newSchema.json
dirac_version:
- v8.0.27
- v8.1.0a17
- prod
- pre

steps:
- uses: actions/checkout@v4
Expand All @@ -89,12 +89,17 @@ jobs:
X509_VOMS_DIR: /cvmfs/grid.cern.ch/etc/grid-security/vomsdir
DIRAC_VOMSES: /cvmfs/grid.cern.ch/etc/grid-security/vomses
run: |
if [ "${{ matrix.dirac_version }} == "prod"]; then
version=$(curl -s "https://api.github.com/repos/DIRACGrid/DIRAC/releases") | jq -r '.[].tag_name' | sort -V | grep -v 'a' | tail -n 1
else
version=$(curl -s "https://api.github.com/repos/DIRACGrid/DIRAC/releases") | jq -r '.[].tag_name' | sort -V | grep 'a' | tail -n 1
fi
cd Pilot
cp ../tests/CI/${{ matrix.pilot_schema }} 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_DIRAC_VERSION/${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
Expand Down Expand Up @@ -127,12 +132,13 @@ jobs:
chmod 400 etc/grid-security/hostkey.pem
- name: tests
run: |
version=$(curl -s "https://api.github.com/repos/DIRACGrid/DIRAC/releases") | jq -r '.[].tag_name' | sort -V | grep 'a' | tail -n 1
cd Pilot
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/v8.1.0a17/g" pilot.json
sed -i "s/VAR_DIRAC_VERSION/${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
Expand Down Expand Up @@ -196,8 +202,8 @@ jobs:
- dteam
- gridpp
dirac_version:
- v8.0.27
- v8.1.0a17
- prod
- pre

steps:
- uses: actions/checkout@v4
Expand All @@ -219,12 +225,17 @@ jobs:
chmod 400 etc/grid-security/hostkey.pem
- name: tests
run: |
if [ "${{ matrix.dirac_version }} == "prod"]; then
version=$(curl -s "https://api.github.com/repos/DIRACGrid/DIRAC/releases") | jq -r '.[].tag_name' | sort -V | grep -v 'a' | tail -n 1
else
version=$(curl -s "https://api.github.com/repos/DIRACGrid/DIRAC/releases") | jq -r '.[].tag_name' | sort -V | grep 'a' | tail -n 1
fi
cd Pilot
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-full.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_DIRAC_VERSION/${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
Expand Down Expand Up @@ -277,14 +288,15 @@ jobs:
X509_VOMS_DIR: /cvmfs/lhcb.cern.ch/etc/grid-security/vomsdir
DIRAC_VOMSES: /cvmfs/lhcb.cern.ch/etc/grid-security/vomses
run: |
version=$(echo $(curl -s "https://gitlab.cern.ch/api/v4/projects/3588/releases") | jq -r '.[].name' | sort -V | grep -v 'a' | tail -n 1)
cd Pilot
export VO_LHCB_SW_DIR=${GITHUB_WORKSPACE}/Pilot
curl https://gitlab.cern.ch/lhcb-dirac/LHCbPilot/-/raw/${{ matrix.pilot_version }}/LHCbPilot/LHCbPilotCommands.py -o LHCbPilotCommands.py
cp ../tests/CI/${{ matrix.pilot_schema }} pilot.json
sed -i "s/VAR_JENKINS_SITE/DIRAC.Jenkins.ch/g" pilot.json
sed -i "s/VAR_JENKINS_CE/jenkins-lhcb.cern.ch/g" pilot.json
sed -i "s/VAR_JENKINS_QUEUE/jenkins-queue_not_important/g" pilot.json
sed -i "s/VAR_DIRAC_VERSION/v11.0.20/g" pilot.json
sed -i "s/VAR_DIRAC_VERSION/${version}0/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
Expand Down Expand Up @@ -325,13 +337,14 @@ jobs:
chmod 400 etc/grid-security/hostkey.pem
- name: tests
run: |
version=$(echo $(curl -s "https://gitlab.cern.ch/api/v4/projects/3588/releases") | jq -r '.[].name' | sort -V | grep -v 'a' | tail -n 1)
cd Pilot
curl https://lhcbdirac.s3.cern.ch/Pilot3/LHCbPilotCommands.py -o LHCbPilotCommands.py
cp ../tests/CI/${{ matrix.pilot_schema }} pilot.json
sed -i "s/VAR_JENKINS_SITE/DIRAC.Jenkins.ch/g" pilot.json
sed -i "s/VAR_JENKINS_CE/${{ matrix.ce }}/g" pilot.json
sed -i "s/VAR_JENKINS_QUEUE/jenkins-queue_not_important/g" pilot.json
sed -i "s/VAR_DIRAC_VERSION/v11.0.20/g" pilot.json
sed -i "s/VAR_DIRAC_VERSION/${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
Expand Down Expand Up @@ -372,13 +385,14 @@ jobs:
chmod 400 etc/grid-security/hostkey.pem
- name: tests
run: |
version=$(echo $(curl -s "https://gitlab.cern.ch/api/v4/projects/3588/releases") | jq -r '.[].name' | sort -V | grep -v 'a' | tail -n 1)
cd Pilot
curl https://gitlab.cern.ch/lhcb-dirac/LHCbPilot/-/raw/${{ matrix.pilot_version }}/LHCbPilot/LHCbPilotCommands.py -o LHCbPilotCommands.py
cp ../tests/CI/${{ matrix.pilot_schema }} pilot.json
sed -i "s/VAR_JENKINS_SITE/DIRAC.Jenkins.ch/g" pilot.json
sed -i "s/VAR_JENKINS_CE/jenkins-lhcb-d.cern.ch/g" pilot.json
sed -i "s/VAR_JENKINS_QUEUE/jenkins-queue_not_important/g" pilot.json
sed -i "s/VAR_DIRAC_VERSION/v11.0.20/g" pilot.json
sed -i "s/VAR_DIRAC_VERSION/${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
Expand Down

0 comments on commit 6d9ec7c

Please sign in to comment.