Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 2962889ae41ea47c4adddfde25f00b32 > files > 8

perl-Test-AutoBuild-1.2.2-13.fc15.i686.rpm


[%- IF config.adminEmail %]
admin-email = [% config.adminEmail %]
[% END -%]

[%- IF config.adminName %]
admin-name = [% config.adminName %]
[% END -%]

[%- IF config.groupEmail %]
group-email = [% config.groupEmail %]
[% END -%]

[%- IF config.groupName %]
group-name = [% config.groupName %]
[% END -%]

lock = {
  ### If you need a custom impl of the locker....
  # module = Test::AutoBuild::Lock

  file = [% config.buildRoot %]/.build.mutex

  # 3 Alternate methods:
  #   fcntl - Best option for Linux, (Free)BSD and SunOS
  #   flock - Next best, (doesn't work if multiple builders
  #           access same build home over NFS from diff machines,
  #           but does work locally)
  #   file  - Works everywhere, but if builder crashes badly
  #           you may need to rm -f the lock file
  method = [% config.lockMethod %]
}

root = {
  # Where we check out the source to
  source = [% config.buildRoot %]/source-root

  # Where modules install stuff to
  # ./configure --prefix=$AUTOBUILD_BUILD_ROOT/usr
  #  .... and pick up deps from ...
  # ./configure --with-openssl=$AUTOBUILD_BUILD_ROOT/usr
  install = [% config.buildRoot %]/install-root

  # Where we save binary packages to
  package = [% config.buildRoot %]/package-root

  # Where log files are saved
  log = [% config.buildRoot %]/log-root
}

log4perl = {
  # No need to change 'WARN' to anything higher here.
  # Instead use '--debug' or '--verbose' flags when
  # runing the builder, which automatically changes
  # the level to 'DEBUG' or "INFO" respectively
  [% IF config.engineLogFile.defined %]
  log4perl.rootLogger = WARN, Screen, File
  [% ELSE %]
  log4perl.rootLogger = WARN, Screen
  [% END %]

  # To get progress updates
  log4perl.logger.Test.AutoBuild.Monitor.Log4perl = INFO

  log4perl.appender.Screen        = Log::Log4perl::Appender::Screen
  log4perl.appender.Screen.stderr = 1
  #log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout
  log4perl.appender.Screen.layout = Log::Log4perl::Layout::PatternLayout
  log4perl.appender.Screen.layout.ConversionPattern=[% "%p %r" %]] %c - %m%n

  [% IF config.engineLogFile.defined %]
  log4perl.appender.File        = Log::Log4perl::Appender::File
  log4perl.appender.File.filename = [% config.engineLogFile %]
  #log4perl.appender.File.layout = Log::Log4perl::Layout::SimpleLayout
  log4perl.appender.File.layout = Log::Log4perl::Layout::PatternLayout
  log4perl.appender.File.layout.ConversionPattern=[% "%p %r" %]] %c - %m%n
  [% END %]
}

counter = {
  module = Test::AutoBuild::Counter::Timestamp
}


platforms = {
  # We only have single entry for the native build host
  host = {
    [% IF platform.label %]
    label = [% platform.label %]
    [% ELSE %]
    # Guess from /etc/issue
    #label = RHEL 3, i686
    [% END %]

    [% IF platform.operating_system %]
    operating_system = [% platform.operating_system %]
    [% ELSE %]
    # Get from uname
    #operating_system = GNU/Linux
    [% END %]

    [% IF platform.architecture %]
    architecture = [% platform.architecture %]
    [% ELSE %]
    # Get from uname
    architecture = i686
    [% END %]

    [% IF platform.options %]
    [% FOREACH name = platform.options.keys %]
    [% name %] = [% platform.options.$name %]
    [% END %]
    [% END %]
  }
}

archive = {
  # Disable archive if doing formals release builds
  enabled = [% config.features.cache %]

  # Use a different implementation  
  module = Test::AutoBuild::ArchiveManager::File

  # How long to keep an archive around for
  max-age = [% config.maxCacheAge %]

  # Limit on total number of archives 
  max-instance = 1000

  # Limit on total disk usage of all archives
  # M for megabytes, G for gigabytes, k for kilobytes
  max-size = [% config.maxCacheSize %]

  options = {
    # Cache modules which don't change
    archive-dir = [% config.buildRoot %]/build-archive
  }
}

# Module groups (for web status)
groups = {
  [% FOREACH name = config.groups.keys %]
  [% SET group = config.groups.$name %]
  [% name %] = {
      label = [% group.label %]
      [% IF group.enabled.defined %]
      enabled = [% group.enabled %]
      [% END %]
  }
  [% END %]
}

# Global environment variables
env = {
  [% FOREACH name = config.env.keys %]
  [% name %] = [% config.env.$name %]
  [% END %]
}

monitors = {
  log4perl = {
    label = Log4Perl Monitor
    module = Test::AutoBuild::Monitor::Log4perl
  }
#  dbus = {
#    label = DBus Monitor
#    module = Test::AutoBuild::Monitor::DBus
#    options = {
#      bus = session
#      bus = system
#      bus = tcp:host=localhost,port=9991
#    }
#  }
  cmd = {
    label = Command Line Monitor
    module = Test::AutoBuild::Monitor::CommandLine
  }
#  pipe = {
#    label = Pipe Monitor
#    module = Test::AutoBuild::Monitor::Pipe
#    options = {
#      path = /tmp/autobuild-monitor
#      mask = 0755
#    }
#  }
}

# Code repositories
repositories = {
  [% FOREACH name = config.repositories.keys %]
  [% SET repo = config.repositories.$name %]
  [% name %] = {
      label = [% repo.label %]
      [% IF repo.enabled.defined %]
      enabled = [% repo.enabled %]
      [% END %]
      [% IF repo.module.defined %]
      module = [% repo.module %]
      [% ELSE %]
        [% SWITCH repo.type %]
        [% CASE "cvs" %]
      module = Test::AutoBuild::Repository::CVS
        [% CASE "p4" %]
      module = Test::AutoBuild::Repository::Perforce
        [% CASE "tla" %]
      module = Test::AutoBuild::Repository::GNUArch
        [% CASE "hg" %]
      module = Test::AutoBuild::Repository::Mercurial
        [% CASE "git" %]
      module = Test::AutoBuild::Repository::Git
        [% CASE "darcs" %]
      module = Test::AutoBuild::Repository::Darcs
        [% CASE "bzr" %]
      module = Test::AutoBuild::Repository::Bazaar
        [% CASE "mtn" %]
      module = Test::AutoBuild::Repository::Monotone
        [% CASE "svk" %]
      module = Test::AutoBuild::Repository::SVK
        [% CASE "svn" %]
      module = Test::AutoBuild::Repository::Subversion
        [% CASE "disk" %]
      module = Test::AutoBuild::Repository::Disk
        [% END %]
      [% END %]
      options = {
      [% FOREACH key = repo.options.keys %]
         [% key %] = [% repo.options.$key %]
      [% END %]
         command = {
            module = Test::AutoBuild::Command::SELocal
            options = {
               context = user_u:system_r:abscmtool_t:s0
            }
         }
      }
      env = {
      [% FOREACH key = repo.env.keys %]
         [% key %] = [% repo.env.$key %]
      [% END %]
      }
  }
  [% END %]
#  p4 = {
#    label = Perl Perforce Server
#    module = Test::AutoBuild::Repository::Perforce
#    env = {
#      P4CONFIG = [% config.buildRoot %]/.p4config
#    }
#    options = {
#      force-refresh = false
#    }
#  }
#  cvs = {
#    label = GNA Anonymous CVS Server
#    module = Test::AutoBuild::Repository::CVS
#    env = {
#      CVSROOT = :pserver:anonymous@cvs.gna.org:/cvs/testautobuild
#    }
#  }
#  arch = {
#    label = GNU Arch
#    module = Test::AutoBuild::Repository::GNUArch
#    options = {
#     archive-name = lord@emf.net--2004
#     archive-uri = http://arch.quackerhead.com/~lord/archives/lord@emf.net--2004
#    }
#  }
#
#  hgrepo = {
#    label = Mercurial
#    module = Test::AutoBuild::Repository::Mercurial
#    options = {
### Since each branch is a repository and you'll likely have
### many branches, module's source will be defined relative 
### to a base URL for your server
#      base-url = http://www.selenic.com/
#    }
#  }
}

# The various package types to distribute
package-types = {
  rpm = {
    label = Linux RPMs
    spool = [% config.buildRoot %]/package-root/rpm
    extension = .rpm
    # Delete RPMs that are more than one day old
    # clean = 1d
  }
  pkg = {
    label = Solaris packages
    spool = [% config.buildRoot %]/package-root/pkg
    extension = .pkg
  }
  zip = {
    label = ZIP packages
    spool = [% config.buildRoot %]/package-root/zip
    extension = .zip
    # Delete ZIPs that are more than six hours old
    # clean = 6h
  }
  tgz = {
    label = Tar+GZip packages
    spool = [% config.buildRoot %]/package-root/tar
    extension = .tar.gz
  }
  deb = {
    label = Debian Packages
    spool = [% config.buildRoot %]/package-root/debian
    extension = .deb
  }
}

publishers = {
  copy = {
    label = File Copier
    module = Test::AutoBuild::Publisher::Copy
  }
}

# List of modules to checkout of CVS
modules = {
  [% FOREACH name = config.modules.keys %]
  [% SET module = config.modules.$name %]
  [% name %] = {
      label = [% module.label %]
      [% IF module.enabled.defined %]
      enabled = [% module.enabled %]
      [% END %]

      [%- IF module.adminEmail %]
      admin-email = [% module.adminEmail %]
      [% END -%]
      
      [%- IF module.adminName %]
      admin-name = [% module.adminName %]
      [% END -%]
      
      [%- IF module.groupEmail %]
      group-email = [% module.groupEmail %]
      [% END -%]
      
      [%- IF module.groupName %]
      group-name = [% module.groupName %]
      [% END -%]
      
      [% IF module.source %]
      source = {
        repository = [% module.source.repository %]
        path = [% module.source.path %]
      }
      [% ELSE %]
      sources = (
        [% FOREACH src = module.sources %]
        {
          repository = [% src.repository %]
          path = [% src.path %]
        }
        [% END %]
      )
      [% END %]
      depends = (
      [% FOREACH dep = module.depends %]
         [% dep %]
      [% END %]
      )
      links = (
      [% FOREACH link = module.links %]
         {
           label = [% link.label %]
           href = [% link.href %]
         }
      [% END %]
      )
      artifacts = (
      [% FOREACH af = module.artifacts %]
         {
           label = [% af.label %]
           src = [% af.src %]
           dst = [% af.dst %]
           [% IF af.path.defined %]path = [% af.path %][% END%]
           publisher = copy
         }
      [% END %]
      )
      options = {
      [% FOREACH key = module.options.keys %]
         [% key %] = [% module.options.$key %]
      [% END %]
         command = {
            module = Test::AutoBuild::Command::SELocal
            options = {
              context = user_u:system_r:abmodbuild_t:s0
            }
         }
      }
      env = {
      [% FOREACH key = module.env.keys %]
         [% key %] = [% module.env.$key %]
      [% END %]
      }
      groups = (
      [% FOREACH group = module.groups %]
         [% group %]
      [% END %]
      )
      [% IF module.dir.defined %]
      dir = [% module.dir %]
      [% END %]
  }
  [% END %]
}

# Note that stages need to be an array, not a hash.  So,
# use '(' instead of '{'.
stages = (
  # Set the niceness level of the build process
  {
    name = renice
    label = Set Process Priority
    module = Test::AutoBuild::Stage::SetNice
    critical = 0
    options = {
      nice-level = 19
    }
  }
  # Delete any files in the build root(s)
  {
    name = clean-buildroots
    label = Clean Build Roots
    module = Test::AutoBuild::Stage::CleanBuildRoots    
  }
  # Delete any old packages
  {
    name = clean-packages
    label = Clean Packages
    module = Test::AutoBuild::Stage::CleanPackages
  }
  # Delete any expired archives
  {
    name = clean-archive
    label = Clean Archive
    module = Test::AutoBuild::Stage::CleanArchive
  }
  # Create a new archive
  {
    name = create-archive
    label = Create Archive
    module = Test::AutoBuild::Stage::CreateArchive
  }
  # Check out source code
  {
    name = checkout
    label = Checkout Source Code
    module = Test::AutoBuild::Stage::GetSource
    critical = 0
    # Skip checking out of code by setting enabled = 0
    [% IF config.features.checkout.defined -%]
    enabled = [% config.features.checkout %]
    [%- END %]
  }
  # Build everything
  {
    name = buildall
    label = Build group
    module = Test::AutoBuild::Stage::Group
    # Don't abort entire cycle if the module build fails
    critical = 0
    stages = (
      # Basic build
      {
        name = build
        label = Build
        module = Test::AutoBuild::Stage::Build
        options = {
          # control-file = rollingbuild.sh

          # Force abortion of build when a module fails
          # Not usually needed since builder is clever
          # enough to skip a module if a dependency fails
          abort-on-fail = 0
        }
      }
      # Create an ISO image containing several modules
      {
        name = iso
        module = Test::AutoBuild::Stage::ISOBuilder
        label = CD ISO image builder
        critical = 0
        options = {
          scratch-dir = /var/tmp
          iso-dest-dir = [% config.buildRoot %]/public_html/isos
          images = {
            [% FOREACH name = config.isos.keys %]
            [% SET iso = config.isos.$name %]
            [% name %] = {
              name = [% iso.name %]
              label = [% iso.label %]
              package-types = (
                [%- FOREACH type = iso.packageTypes %]
                [% type %]
                [% END -%]
              )
              modules = (
                [%- FOREACH module = iso.modules %]
                [% module %]
                [% END -%]
              )
            }
            [% END %]
          }
        }
      }
    )
  }
  # Output Stages
  {
    name = output
    label = Output
    module = Test::AutoBuild::Stage::Group
    stages = (
      # Copy files to a ftp site
      {
        name = ftp
        module = Test::AutoBuild::Stage::PackageCopier
        label = FTP Site
        critical = 0
        options = {
          directory = [% config.buildRoot %]/public_ftp
        }
      }
      # Copy files to a HTTP site
      {
        name = http
        module = Test::AutoBuild::Stage::PackageCopier
        label = Web Distribution Site
        critical = 0
        options = {
          directory = [% config.buildRoot %]/public_html/dist/%p
        }
      }
      # Copy logs to HTTP site
      {
        name = log
        module = Test::AutoBuild::Stage::LogCopier
        label = Build Log Files
        critical = 0
        options = {
          directory = [% config.buildRoot %]/public_html/logs
        }
      }
      # Copy artifacts to HTTP site
      {
        name = artifacts
        module = Test::AutoBuild::Stage::ArtifactCopier
        label = Build Artifacts
        critical = 0
        options = {
          directory = [% config.buildRoot %]/public_html/artifacts/%m
        }
      }
      # Update Apt repository
      {
        name = apt
        label = Update Apt Repository
        module = Test::AutoBuild::Stage::Apt
        critical = 0
        [% IF config.features.apt_index.defined -%]
        enabled = [% config.features.apt_index %]
        [%- END %]
        options = {
          directory = [% config.buildRoot %]/public_html/dist
          format = rpm
          # Either create dirs based on module, or group
          type = module
          #type = group
          # Optionally restrict to some subset of groups/modules
          #components = group
          command = {
            module = Test::AutoBuild::Command::SELocal
            options = {
               context = user_u:system_r:abrepotool_t:s0
            }
          }
        }
      }
      # Update Yum repository
      {
        name = yum
        label = Update Yum Repository
        module = Test::AutoBuild::Stage::Yum
        critical = 0
        [% IF config.features.yum_index.defined -%]
        enabled = [% config.features.yum_index %]
        [%- END %]
        options = {
          directory = [% config.buildRoot %]/public_html/dist
          parameters = -d
          command = {
            module = Test::AutoBuild::Command::SELocal
            options = {
               context = user_u:system_r:abrepotool_t:s0
            }
          }
        }
      }
      # Update CreateRepo repository
      {
        name = createrepo
        label = Update Package Repository
        module = Test::AutoBuild::Stage::CreateRepo
        critical = 0
        [% IF config.features.createrepo_index.defined -%]
        enabled = [% config.features.createrepo_index %]
        [%- END %]
        options = {
          directory = [% config.buildRoot %]/public_html/dist
          parameters = -p
          command = {
            module = Test::AutoBuild::Command::SELocal
            options = {
               context = user_u:system_r:abrepotool_t:s0
            }
          }
        }
      }
      # Generate HTML status pages
      {
        name = status
        label = Web Status Site
        module = Test::AutoBuild::Stage::HTMLStatus
        options = {
          variables = {
            # If doing virtual hosting, set your desired hostname
            # hostname = builder.example.com
            [% IF config.hostname.defined %]hostname = [% config.hostname %][% END %]
            http_prefix = [% IF config.httpPrefix.defined %][% config.httpPrefix %][% ELSE %]/~builder[% END %]
            default_css = test-autobuild.css
            title = [% config.label %]
          }
          template-src-dir = [% config.templateDir %]
          template-dest-dir = [% config.buildRoot %]/public_html
          # Placeholders in file names are:
          #  %m -> module name
          #  %g -> group
          #  %r -> repository
          #  %p -> package type
          files = (
            {
              src = index-group.html
              dst = index.html
            }
            index-module.html
            index-repository.html
            index-iso.html
            {
              src = module.html
              dst = module-%m.html
            }
            status.html
            index.rss
            failures.rss
            generic.css
            classic-blue.css
            classic-red.css
            test-autobuild.css
            logo-success.png
            logo-failed.png
            rss10.png
          )
        }
      }
      # Send an email alert on failure
      {
        # Set enabled = 1 to turn on this stage
        [% IF config.features.email_alerts.defined -%]
        enabled = [% config.features.email_alerts %]
        [%- END %]
        module = Test::AutoBuild::Stage::EmailAlert
        name = email
        label = Email Alerts
        options = {
          # Send to the admin for the builder/module
          #to = admin 
          # Send to the developer group for builder/module
          #to = group
          # Or send to explicit address
          #to = user@example.com
          [% IF config.alert.to %]
          to = [% config.alert.to %]
          [% END %]

          # Send a single alert for entire builder
          #scope = builder
          # Or one alert per module
          #scope = module
          [% IF config.alert.scope %]
          scope = [% config.alert.scope %]
          [% END %]

          # Address to use as sender if not set, defaults
          # to machine's hostname & UNIX user account
          #from = builder@example.com
          [% IF config.alert.from %]
          from = [% config.alert.from %]
          [% END %]

          # STMP relay to use if not localhost
          #smtp_server = mail.example.com
          [% IF config.alert.smtpServer %]
          smtp_server = [% config.alert.smtpServer %]
          [% END %]

          # When to send
          #    always - on every build cycle, regardless of status
          #    fail - on every failure
          #    first-fail - on first failure after a successful cycle
          trigger = [% IF config.alert.trigger.defined %][% config.alert.trigger %][% ELSE %]first-fail[% END %]

          # Set of arbitrary variables passed into template engine
          variables = {
            subject = ALERT [% config.label %]
            # If doing virtual hosting, set your desired hostname
            # hostname = builder.example.com
            [% IF config.hostname.defined %]hostname = [% config.hostname %][% END %]
            http_prefix = [% IF config.httpPrefix.defined %][% config.httpPrefix %][% ELSE %]/~builder[% END %]
          }

          template-dir = [% config.templateDir %]
        }
      }
      # If you have the optional testautobuild-bicycle package
#      {
#        enabled = 0
#        module = Test::AutoBuild::Stage::Bicycle
#        name = bicycle
#        label = Bicycle
#        options = {
#          url = http://bicycle.example.com/bicyclesink/bicyclemsg/
#          #message-log = [% config.buildRoot %]/bicycle-log
#          #send-cached = 1
#          #configuration = {
#          #  distro = RHEL-3
#          #  perl = 5.8.0
#          #}
#        }
#      }
    )
  }
)

# End of file