Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/LSSTTD-1518' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Johnson committed Sep 29, 2020
2 parents 447fc64 + 7f0c0e3 commit d04f798
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bot-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from org.lsst.ccs.scripting import CCS
from ccs import aliases
from ccs import proxies
from ccs import versions
from java.time import Duration

# Temporary work around for problems with CCS responsiveness
Expand All @@ -25,7 +26,11 @@

#CCS.aliases = {'focal-plane': 'focal-plane-sim', 'bot-bench': 'bot-bench-sim'}
#CCS.aliases = {'focal-plane': 'ts8-fp', 'bot-bench': 'ts8-bench' }
#ccs_sub.write_versions()

# Assume if run is set we are running under eTraveler
if options.run:
fp = CCS.attachProxy('focal-plane')
versions.write_versions(fp)

import config

Expand Down
20 changes: 20 additions & 0 deletions lib/ccs/versions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env ccs-script
from org.lsst.ccs.scripting import CCS

def write_versions(fp):
vList = [];
versions = fp.getCCSVersions()
group = fp.getAgentProperty("group")
has_snapshot = False
for agent in versions.getAgents():
agentGroup = agent.getAgentProperty("group")
if agent.isAgentWorkerOrService() and agentGroup == group:
version = versions.getDistributionInfo(agent).getVersion()
has_snapshot = has_snapshot or version.endswith("SNAPSHOT")
vList.append("%s = %s\n" % (agent.getName(), version))
vList.sort()
if has_snapshot:
print "WaRNING, non released CCS subsystem in use"
with open("ccs_versions.txt", "w") as file:
for version in vList:
file.write(version)

0 comments on commit d04f798

Please sign in to comment.