diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index f78c3210..b5a29841 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -4,6 +4,7 @@ on: [push] jobs: local_install: + if: github.repository_owner != 'DIRACGrid' runs-on: ubuntu-latest strategy: @@ -60,6 +61,7 @@ jobs: X509_USER_PROXY=$pilot_proxy_file python dirac-pilot.py --modules https://github.com/DIRACGrid/DIRAC.git:::DIRAC:::${{ matrix.dirac_branch }} -M 1 -S DIRAC-Certification -N jenkins.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --wnVO=${{ matrix.VO }} --pilotUUID="${pilotUUID}" --debug release_cvmfs_CEs: + if: github.repository_owner != 'DIRACGrid' runs-on: ubuntu-latest strategy: @@ -116,6 +118,7 @@ jobs: X509_USER_PROXY=$pilot_proxy_file python dirac-pilot.py -M 1 -S DIRAC-Certification -N ${{ matrix.ce }} -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --architectureScript=dirac-platform --preinstalledEnvPrefix=/cvmfs/dirac.egi.eu/dirac --wnVO=dteam --pilotUUID="${pilotUUID}" --debug matching: + if: github.repository_owner != 'DIRACGrid' runs-on: ubuntu-latest strategy: @@ -166,6 +169,7 @@ jobs: X509_USER_PROXY=$pilot_proxy_file python dirac-pilot.py --modules https://github.com/DIRACGrid/DIRAC.git:::DIRAC:::integration -M 1 -N jenkins-full.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --wnVO=dteam --pilotUUID="${pilotUUID}" --debug release_cvmfs_matching: + if: github.repository_owner != 'DIRACGrid' runs-on: ubuntu-latest strategy: @@ -216,6 +220,7 @@ jobs: X509_USER_PROXY=$pilot_proxy_file python dirac-pilot.py -M 1 -S DIRAC-Certification -N jenkins-full.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --preinstalledEnvPrefix=/cvmfs/dirac.egi.eu/dirac --wnVO=${{ matrix.VO }} -o cvmfsOnly --pilotUUID="${pilotUUID}" --debug release_prod-cvmfs_matching_CEs: + if: github.repository_owner != 'DIRACGrid' runs-on: ubuntu-latest strategy: @@ -276,6 +281,7 @@ jobs: #### LHCb ext-lhcb_integration: + if: github.repository_owner != 'DIRACGrid' runs-on: ubuntu-latest strategy: @@ -331,6 +337,7 @@ jobs: X509_USER_PROXY=$pilot_proxy_file python dirac-pilot.py -M 1 -N jenkins-lhcb.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch -e LHCb -l LHCb -E LHCbPilot --architectureScript=dirac-architecture --wnVO=LHCb -o lbRunOnly --pilotUUID="${pilotUUID}" --debug ext-lhcb_integration_cvmfs: + if: github.repository_owner != 'DIRACGrid' runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 17b4b7ce..1605901f 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -47,4 +47,4 @@ jobs: with: name: Pilot_${{ matrix.branch }} path: tmp_dir - retention-days: 1 + retention-days: 3 diff --git a/.github/workflows/semantic.yml b/.github/workflows/semantic.yml index 0a59eed6..2f396c69 100644 --- a/.github/workflows/semantic.yml +++ b/.github/workflows/semantic.yml @@ -15,13 +15,13 @@ jobs: - name: Check Commit Format uses: gsactions/commit-message-checker@v1 with: - pattern: '^(docs|feat|fix|refactor|style|test)( ?\(.*\))?: .+$' + pattern: '^(docs|feat|fix|refactor|style|test)( ?\(.*\))?: .+$|^Merge .+$' excludeDescription: 'true' # optional: this excludes the description body of a pull request excludeTitle: 'true' # optional: this excludes the title of a pull request checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true flags: 'gm' - error: 'Your commit has to follow the format "(): "".' + error: 'Your commit has to follow the format "(): ".' - name: Check Commit Length uses: gsactions/commit-message-checker@v1 with: diff --git a/Pilot/pilotCommands.py b/Pilot/pilotCommands.py index b6d9cef3..6eab30c2 100644 --- a/Pilot/pilotCommands.py +++ b/Pilot/pilotCommands.py @@ -203,6 +203,7 @@ def _sourceEnvironmentFile(self): if retCode: self.log.error("Could not parse the %s file [ERROR %d]" % (self.pp.installEnv["DIRAC_RC_PATH"], retCode)) self.exitWithError(retCode) + self.pp.installEnv = {} for line in output.split("\n"): try: var, value = [vx.strip() for vx in line.split("=", 1)] @@ -375,7 +376,7 @@ def execute(self): try: # In case we want to force local installation (in absence of CVMFS or for test reasons) - if "diracInstallOnly" in self.pp.genericOption: + if "diracInstallOnly" in self.pp.genericOptions: self.log.info("NOT sourcing: starting traditional DIRAC installation") self._localInstallDIRAC() return @@ -397,7 +398,7 @@ def execute(self): except OSError as e: self.log.error("Exception when trying to source the DIRAC environment: %s" % str(e)) - if "cvmfsOnly" in self.pp.genericOption: + if "cvmfsOnly" in self.pp.genericOptions: self.exitWithError(1) self.log.warn("Source of the DIRAC environment NOT DONE: starting traditional DIRAC installation") self._localInstallDIRAC() @@ -759,9 +760,8 @@ def execute(self): if self.pp.ceType: self.cfg.append("-o /LocalSite/LocalCE=%s" % self.pp.ceType) - for o, v in self.pp.optList: - if o == "-o" or o == "--option": - self.cfg.append('-o "%s"' % v) + for genericOption in self.pp.genericOptions: + self.cfg.append('-o "%s"' % genericOption) if self.pp.pilotReference: self.cfg.append("-o /LocalSite/PilotReference=%s" % self.pp.pilotReference) diff --git a/Pilot/pilotTools.py b/Pilot/pilotTools.py index 79af2d86..40153326 100644 --- a/Pilot/pilotTools.py +++ b/Pilot/pilotTools.py @@ -907,7 +907,7 @@ def __init__(self): self.gateway = "" self.useServerCertificate = False self.pilotScriptName = "" - self.genericOption = "" + self.genericOptions = [] self.wnVO = "" # for binding the resource (WN) to a specific VO # Some commands can define environment necessary to execute subsequent commands self.installEnv = os.environ @@ -1206,7 +1206,7 @@ def __initCommandLine2(self): elif o == "--pilotUUID": self.pilotUUID = v elif o in ("-o", "--option"): - self.genericOption = v + self.genericOptions.append(v) elif o in ("-t", "--tag"): self.tags.append(v) elif o == "--requiredTag": diff --git a/Pilot/tests/Test_Pilot.py b/Pilot/tests/Test_Pilot.py index cf701e4a..d2a326c7 100644 --- a/Pilot/tests/Test_Pilot.py +++ b/Pilot/tests/Test_Pilot.py @@ -105,6 +105,18 @@ def test_InitJSON(self): self.assertEqual(pp.commandOptions["b"], "2") self.assertEqual(pp.commandOptions["c"], "3") + sys.argv[1:] = [ + "--Name", + "grid1.example.com", + "--option", + "diracInstallOnly", + "-o", + "/LocalSite/Example=value", + ] + pp = PilotParams() + + self.assertEqual(pp.genericOptions, ["diracInstallOnly", "/LocalSite/Example=value"]) + sys.argv[1:] = [ "--Name", "grid1.example.com",