Skip to content

Commit

Permalink
fix: standard tags (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdschaap authored Jul 14, 2020
1 parent 4e54b5e commit 514d437
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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|
Expand Down
7 changes: 6 additions & 1 deletion core/src/bake-interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ export interface IBakeConfig {
ingredients?: Array<string>,
resourceGroup: boolean,
rgOverride?: BakeVariable,
parallelRegions?: boolean
parallelRegions?: boolean,
costcenter?: string,
businessunit?: string,
product?: string,
application?: string,
supportteam?: string

variables?: Map<string,BakeVariable>
recipe: Map<string, IIngredient>
Expand Down
5 changes: 5 additions & 0 deletions core/src/tag-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down

0 comments on commit 514d437

Please sign in to comment.