Skip to content

Commit

Permalink
app name (#4041)
Browse files Browse the repository at this point in the history
  • Loading branch information
subhashish-devtron committed Oct 9, 2023
1 parent dd54ea5 commit f36f04b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/app/AppService.go
Original file line number Diff line number Diff line change
Expand Up @@ -1406,6 +1406,7 @@ func (impl *AppServiceImpl) GetEnvOverrideByTriggerType(overrideRequest *bean.Va
ClusterName: env.Cluster.ClusterName,
Namespace: env.Namespace,
ImageTag: overrideRequest.ImageTag,
AppName: overrideRequest.AppName,
},
}

Expand Down
3 changes: 3 additions & 0 deletions pkg/resourceQualifiers/bean.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type SystemMetadata struct {
ClusterName string
Namespace string
ImageTag string
AppName string
}

func (metadata *SystemMetadata) GetDataFromSystemVariable(variable SystemVariableName) string {
Expand All @@ -27,6 +28,8 @@ func (metadata *SystemMetadata) GetDataFromSystemVariable(variable SystemVariabl
return metadata.EnvironmentName
case DevtronImageTag:
return metadata.ImageTag
case DevtronAppName:
return metadata.AppName
}
return ""
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/resourceQualifiers/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const (
DevtronClusterName SystemVariableName = "DEVTRON_CLUSTER_NAME"
DevtronEnvName SystemVariableName = "DEVTRON_ENV_NAME"
DevtronImageTag SystemVariableName = "DEVTRON_IMAGE_TAG"
DevtronAppName SystemVariableName = "DEVTRON_APP_NAME"
)

var SystemVariables = []SystemVariableName{DevtronNamespace, DevtronClusterName, DevtronEnvName, DevtronImageTag}
var SystemVariables = []SystemVariableName{DevtronNamespace, DevtronClusterName, DevtronEnvName, DevtronImageTag, DevtronAppName}

0 comments on commit f36f04b

Please sign in to comment.