Over the course of the next 12 months I will be adding functions to this page so bookmark it and come back regularly for new cool features and updates.
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: BaseService.ts
import { Logger } from "com.vmware.pscoe.library.ts.logging/Logger";
import { ConfigElementAccessor } from "com.vmware.pscoe.library.ts.util/ConfigElementAccessor";
import { Utilities } from "../Utilities";
export class BaseService {
protected objExecutionContext: ExecutionContext;
protected objLogger: Logger;
protected strProjectID: string;
protected strEnvironmentRoadSign: string;
protected objConfigElementAccessorGeneral: ConfigElementAccessor;
protected objConfigElementAccessorEnvironment: ConfigElementAccessor;
constructor(strProjectID: string, strServiceName: string) {
this.objExecutionContext = System.getContext();
this.strProjectID = strProjectID;
this.objLogger = Logger.getLogger(`${strServiceName}Service`);
this.objConfigElementAccessorGeneral = new ConfigElementAccessor("CompanyName/General");
this.strEnvironmentRoadSign = this.objConfigElementAccessorGeneral.get<string>("Environment_Road_Sign");
this.objConfigElementAccessorEnvironment = new ConfigElementAccessor(`Environments/${this.strEnvironmentRoadSign}`);
}
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
