From 514d437b51825bbf72b282cd61897f942d3c6c6d Mon Sep 17 00:00:00 2001 From: bdschaap Date: Tue, 14 Jul 2020 12:09:41 -0400 Subject: [PATCH] fix: standard tags (#175) --- Schema.md | 10 ++++++++++ core/src/bake-interfaces.ts | 7 ++++++- core/src/tag-generator.ts | 5 +++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Schema.md b/Schema.md index 55732aa6..1a9ebc35 100644 --- a/Schema.md +++ b/Schema.md @@ -26,6 +26,11 @@ name: string shortName: string version: string owner: string +costcenter: string +businessunit: string +product: string +application: string +supportteam: string ingredients: [ ingredientTag ] resourceGroup: bool rgOverride: string | expression @@ -40,6 +45,11 @@ recipe: {string: ingredient block} |shortName|yes|code use for resource naming [a-z][A-Z][0-9], 8 chars max| |version|yes|version should match the docker tag| |owner|no|Owner of package as either a team name, email, person, etc.| +|costcenter|no|financial number code assigned to a company +|businessunit|no|specific name assigned to a business unit| +|product|no|Name of the product the resource will be supporting| +|application|no|describes the function of a particular resource (e.g. web server, message broker, database)| +|supportteam|no|team that will be supporting the provisioned resource| |ingredients|yes|List of bake ingredients to use in the recipe| |resourceGroup|no (default true)|Create a resource group for the recipe deployment | |rgOverride|no (default blank)|Name of the resource group to create, if set. Otherwise standard format will be used| diff --git a/core/src/bake-interfaces.ts b/core/src/bake-interfaces.ts index e97c3ecb..362d9879 100644 --- a/core/src/bake-interfaces.ts +++ b/core/src/bake-interfaces.ts @@ -56,7 +56,12 @@ export interface IBakeConfig { ingredients?: Array, resourceGroup: boolean, rgOverride?: BakeVariable, - parallelRegions?: boolean + parallelRegions?: boolean, + costcenter?: string, + businessunit?: string, + product?: string, + application?: string, + supportteam?: string variables?: Map recipe: Map diff --git a/core/src/tag-generator.ts b/core/src/tag-generator.ts index 3898f074..6db0bdb8 100644 --- a/core/src/tag-generator.ts +++ b/core/src/tag-generator.ts @@ -22,6 +22,11 @@ export class TagGenerator { tags.package_version = this._ctx.Config.version tags.bake_version = this._ctx.Environment.toolVersion tags.owner = this._ctx.Config.owner || "" + tags.costcenter = this._ctx.Config.costcenter || "" + tags.businessunit = this._ctx.Config.businessunit || "" + tags.product = this._ctx.Config.product || "" + tags.application = this._ctx.Config.application || "" + tags.supportteam = this._ctx.Config.supportteam || "" //check against pluginVersion be seting, since Ingredient is always set as a default object if (this._ctx.Ingredient.pluginVersion){