Alec the Geek

mobile version http://alecthegeek.mofuse.mobi/

Archive for the ‘Serena Dimensions’ Category

Setting up Serena Dimensions Design Parts and Allocating Roles

Posted by Alec on 23 December 2008

Once thing that often confuses Dimensions CM administrators and users is how to set up and use an effective Design Part Structure (DPS). There is no ‘once size fits all’ answer but I hope the following comments will help guide people to a more comfortable structure.
Read the rest of this entry »

Posted in Serena Dimensions | 3 Comments »

Top Tip: Restrict Dimensions Requests to Prime Only

Posted by Alec on 13 August 2008

If you are a Serena Dimensions administrator you might find this of some use, otherwise I’m afraid it’s ‘move along, nothing to see here…’
Read the rest of this entry »

Posted in Serena Dimensions, Software Configuration Management, Uncategorized | 1 Comment »

Installing a Serena Dimensions standalone system

Posted by Alec on 22 July 2008

Many Dimensions consultants, trainers and administrators have their own personal recipe on setting up a standalone Dimensions CM environment. Here is my latest:
Read the rest of this entry »

Posted in Application Lifecycle Management, Serena Dimensions, Software Configuration Management | Leave a Comment »

A useful Build setup scripts

Posted by Alec on 30 June 2004

NB NOT tested on current versions of Serena Dimensions

Given a list of Build projects, setup projects and build areas. Assumes a naming convention. Need to set the variables buildServer, projectList, buildRoot before running.

importPackage(Packages.com.merant.dimensions.objects);
importPackage(Packages.com.merant.dimensions.collections);
var db=BaseDatabase.getInstance();
db.login("dmtool","dmtool","intermediate","localhost","DIM9");

load("buildProjectsLibrary.js");
//source("buildProjectsLibrary.js");

//
// Find a project. Assumes all project names are unique
//
function findProject(projectName) {
    var projects = BaseDatabase.instance.projects

    var id;
    var project;

    // loop over  project identifiers
    for (var it = projects.iterator(); it.hasNext(); ) {
        // get next  project id
        id = it.next()

        // fetch corresponding Project object
        project = projects.get(id)

       	if (project.name == projectName)
		return project;
    }
    return null;
}

//
// find a build stages registered in the base database. Assumes all stage names are unique
//
function findBuildStage(name) {
    var buildStages = BaseDatabase.instance.buildStages

    var id;
    var buildStage;

    // loop over build stage identifiers
    for (var it = buildStages.iterator(); it.hasNext(); ) {
        // get next build stage id
        id = it.next()

        // fetch corresponding BuildStage object
        buildStage = buildStages.get(id)

	if (buildStage.name == name)
		return buildStage;
    }
    return null;
}
//
// find a build area defined for a project
//
function findBuildAreasAssignedToProject(project,areaName){
    var buildAreas = project.buildAreas

    var id
    var buildArea
    // loop over project objects
    for(var it = buildAreas.iterator(); it.hasNext(); ) {
        // get next build area identifier
        id = it.next()

        // get next buildarea object
        buildArea = buildAreas.get(id)

	if (buildArea.name == areaName)
		return buildArea;
    }
    return null;
}

var buildStageNames=new Array();
  buildStageNames["UT"]="UNIT TEST";
  buildStageNames["ST"]="SYSTEM TEST";
  buildStageNames["REL"]="RELEASE";
  buildStageNames["ER"]="EMERGENCY";

var buildServer = "aus-alecc-mel";
var projectList=new Array("BINGO");
var buildRoot = "c:Builds\";

for (var p in projectList ){
	var cp = findProject(projectList[p]+"1.0");
	if (cp)
		print("Error: Project "+projectList[p]+"1.0  already defined!");
	else
	{
		BaseDatabase.instance.runCommand("DPROJ "+projectList[p]+"1.0 /BUILD_PROJECT="+projectList[p]+" /DESC=\"" +projectList[p]+ " example build\"");
		BaseDatabase.instance.projects.refresh();
		cp = findProject(projectList[p]+"1.0");
		for (var s in buildStageNames){
			var cbs = findBuildStage(buildStageNames[s]);
			if (cbs)
				if (! findBuildAreasAssignedToProject(cp,cp.name +"_"+s))
					createBuildArea(cp, cbs, cp.name +"_"+s, buildServer, buildRoot+cp.name+"\"+s,"Java","","");
				else
					print("Build stage "+cp.name +"_"+s+" already defined");
			else
				print("Error: Build stage "+s+" not found!");
		}
	}
}

Posted in Serena Dimensions, Software Configuration Management | Leave a Comment »