Skip to content

Commit

Permalink
Add Jenkins as a location
Browse files Browse the repository at this point in the history
  • Loading branch information
mfisherlevine committed Jul 19, 2023
1 parent 8eaab33 commit 1fb340e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions python/lsst/summit/utils/efdUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ def makeEfdClient():
return EfdClient('base_efd')
if site in ['staff-rsp', 'rubin-devl']:
return EfdClient('usdf_efd')
if site == 'jenkins':
return EfdClient('usdf_efd')

raise RuntimeError(f"Could not create EFD client as the {site=} is not recognized")

Expand Down
4 changes: 4 additions & 0 deletions python/lsst/summit/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,10 @@ def getSite():
if hostname.startswith('sdfrome'):
return 'rubin-devl'

jenkinsHome = os.getenv('JENKINS_HOME', "")
if jenkinsHome != "":
return 'jenkins'

# we have failed
raise ValueError('Location could not be determined')

Expand Down
1 change: 1 addition & 0 deletions tests/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ scripts.BasicSConscript.tests(pyList=[])
passThrough = ['DAF_BUTLER_REPOSITORY_INDEX', # for repo locations
'EXTERNAL_INSTANCE_URL', # needed to determine site location - see utils.getSite()
'HOSTNAME', # needed to determine site location - see utils.getSite()
'JENKINS_HOME', # needed to determine site location - see utils.getSite()
'PGPASSFILE', # needed for butler authentication
'PGUSER', # needed for butler authentication
]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_efdUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@


@unittest.skipIf(not HAS_EFD_CLIENT, "No EFD client available")
@unittest.skipIf(ON_THE_TTS, "No EFD client available")
@unittest.skipIf(ON_THE_TTS, "Skipping EFD-based tests on the TTS")
@safe_vcr.use_cassette()
class EfdUtilsTestCase(lsst.utils.tests.TestCase):

Expand Down

0 comments on commit 1fb340e

Please sign in to comment.