wiki:Hudson/Labels

Jenkins/Hudson Node Labels

As best practice, we tie all Jenkins jobs to labels (or logical expressions of labels) and not specific hosts. Below is the list of all labels that we define across the Jenkins build farm:

Environment

Label Description Validated*
 SONHost located on the SONNo
 SRNHost located on the SRNNo
 ElemHost located on elements.sandia.gov (SRN)No

Operating systems

Label Description Validated*
 Linux3232-bit Linux operating system (regardless of the actual hardware)Yes
 Linux6464-bit Linux operating system (regardless of the actual hardware)Yes
 RHEL5Red Hat Enterprise Linux, version 5.xYes
 RHEL6Red Hat Enterprise Linux, version 6.xYes
 WinXP32-bit Microsoft Windows XP operating system (regardless of the actual hardware)Yes
 Vista32-bit Microsoft Windows Vista operating system (regardless of the actual hardware)Yes
 Win764-bit Microsoft Windows 7 operating system (regardless of the actual hardware)Yes
 Win7x3232-bit Microsoft Windows 7 operating system (regardless of the actual hardware)Yes
 XMTCray XMT login node (mta-pe module present and loaded)Yes
 Maci64Macintosh Intel OSX with 64-bit kernel (regardless of the actual hardware)No
 Maci32Macintosh Intel OSX with 32-bit kernel (regardless of the actual hardware)No
 MacPPCMacintosh OSX on PPC chipNo
 AIXIBM AIX (regardless of the actual hardware)No
 SolarisSun Solaris (regardless of the actual hardware)No

Software

Label Description Validated*
 Python2.4Python 2.4 is installed and available on the system pathYes
 Python2.5Python 2.5 is installed and available on the system pathYes
 Python2.6Python 2.6 is installed and available on the system pathYes
 Python2.7Python 2.7 is installed and available on the system pathYes
 MSVS2005Microsoft Visual Studio 2005 (8.0) is installed and available via %PATH_MSVS2005%No
 MSVS2008Microsoft Visual Studio 2008 (9.0) is installed and available via %PATH_MSVS2008%Yes
 MSVS2010Microsoft Visual Studio 2010 (10.0) is installed and available via %PATH_MSVS2010%Yes
 JDK5Java 5 Development Kit is installed and available on the system pathNo
 JDK6Java 6 Development Kit is installed and available on the system pathNo
 NSISNullsoft Sciptable Installer Software is installed and available via %PATH_NSIS%Yes
 INNONullsoft Sciptable Installer Software is installed and available via %INNOSETUP%No
 cmake2.8CMake 2.8.x is installed and available on the system pathYes
  • - Validated labels make use of the  LabelVerifier extension point to verify that the label is correct before allowing the build slave to connect to the Jenkins master.

Label Validation Code Example

#!python
test=(2,8)
cmd = ["cmake","--version"]
searchStr = 'cmake version (\d+)\.(\d+)'
matchVer=True

from subprocess import Popen, PIPE, STDOUT
from sys import exit
from re import match
try:
   p = Popen( cmd,  stdout=PIPE, stderr=STDOUT )
   stdout, stderr = p.communicate()
   if p.returncode:
      print "ERROR running '%s':\n%s" % (' '.join(cmd), stderr)
      exit(1)
except:
   print "FATAL ERROR running '%s'" % (' '.join(cmd), )
   raise
for line in stdout.splitlines():
   g = match(searchStr, line)
   if g:
      found = g.groups()
      print "System version: %s (looking for %s %s)" % (found, matchVer and "==" or ">=", test)
      for idx, val in enumerate(test):
         if val == int(found[idx]):
            continue
         if matchVer:
            exit(1)
         else:
            exit( val > int(found[idx]) and 1 or 0 )
      exit(0)
print "ERROR: no line matching '%s'" % searchStr
exit(1)