• Home
  • Services
    • Consultancy
    • Custom Software Solutions
    • Systems Adminsitration
    • SCM
      • Clearcase
      • Multisite
      • Clearquest
      • Release Managment
      • CVS
    • Web Applications
    • Customers
  • Publications
    • Clearcase
      • Triggers
      • Open Source Builds
    • Clearquest
      • Clearquest Daemon
      • DB Conversions
    • Systems Admin
      • Unix/Linux
      • Windows
    • Scripting
      • Perl
      • PHP
      • ECRDig
  • About
    • Services
    • Our People
    • Our Philosophy
    • Contact Us
 

ClearSCM Inc.

You are viewing an unstyled version of this page. Either your browser does not support Cascading Style Sheets (CSS) or CSS styling has been disabled.

NAME mktriggers.pl

Enforce the application of triggers to vobs

VERSION

Author

Andrew DeFaria <Andrew@ClearSCM.com>

Revision:

Revision 1.4

Created:

Sat Apr 3 09:06:11 PDT 2003

Modified:

Modifed 2010/04/03 16:20:45

SYNOPSIS

 Usage: mktriggers.pl [-u|sage] [-[no]e|xec] [-[no]a|dd] [-[no]r|eplace]
                      [-[no]p|rivate] [ -vobs ] [-ve|rbose] [-d|ebug]

 Where:

  -u|sage:       Displays usage
  -[no]e|exec:   Execute mode (Default: Do not execute)
  -[no]a|dd:     Add any missing triggers (Default: Don't add)
  -[no]r|eplace: Replace triggers even if already present (Default:
                 Don't replace)

                 Note: If neither -add nor -replace is specified then
                 both -add and -replace are performed.

  -triggers:     Name of triggers.dat file (Default:
                 $FindBin::Bin/../etc/triggers.dat)
  -[no]p|rivate: Process private vobs (Default: Don't process private
                 vobs)

  -ve|rbose:     Be verbose
  -d|ebug:       Output debug messages

  -vob           List of vob tags to apply triggers to (default all vobs)

Note: You can specify -vob /vobs/vob1,/vobs/vob2 -vob /vobs/vob3 which will result in processing all of /vobs/vobs1, /vobs/vob2 and /vobs/vob3.

DESCRIPTION

This script parses triggers.dat and created trigger types in vobs. It is designed to be run periodically (cron(1)) and will add/replace triggers on all vobs by default. It can also operate on individual vobs if required. The script is driven by a data file, triggers.dat, which describes which triggers are to be enforced one which vobs.

triggers.dat

File format: Lines beginning with ``#'' are treated as comments Blank lines are skipped. Spaces and tabs can be used for whitespace.

  # Globals
  WinTriggerPath:       \\<NAS device>\clearscm\triggers
  LinuxTriggerPath:     /net/<NAS device>/clearscm/triggers

  # All vobs get the evil twin trigger
  Trigger: EVILTWIN
    Description:        Evil Twin Prevention Trigger
    Type:               -all -element
    Opkinds:            -preop lnname
    ScriptEngine:       Perl
    Script:             eviltwin.pl
  EndTrigger

  # Only these vobs get this trigger to enforce a naming policy
  # Note the trigger script gets a parameter 
  Trigger: STDNAMES
    Description:        Enforce standard naming policies
    Type:               -all -element
    Opkinds:            -preop lnname
    ScriptEngine:       Perl
    Script:             stdnames.pl -lowercase
    Vobs:               \dbengine, \backend
  EndTrigger

  # All vobs get rmelen trigger except ours!
  Trigger: RMELEM
    Description:        Disable RMELEM
    Type:               -all -element
    Opkinds:            -preop lnname
    ScriptEngine:       Perl
    Script:             rmelem.pl
    Novobs:             \scm
  EndTrigger

ENVIRONMENT

If the environment variable VEBOSE or DEBUG are set then it's as if -verbose or -debug was specified.

COPYRIGHT

Copyright (c) 2004 Andrew DeFaria , ClearSCM, Inc. All rights reserved.