Skip to content

Commit

Permalink
Add clientCode and parentComponent (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
CamaradeRoman committed Jan 25, 2024
1 parent 95d4c02 commit 96c325a
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ import io.swagger.v3.oas.annotations.media.Schema
@Schema(
description = "Component info",
example = "{\n" +
" \"id\": \"ee-component\",\n" +
" \"name\": \"EE Component\",\n" +
" \"id\": \"ee-client-specific-component\",\n" +
" \"name\": \"EE Client Specific Component\",\n" +
" \"clientCode\": \"CLIENT_CODE\",\n" +
" \"parentComponent\": \"ee-component\",\n" +
" \"securityGroups\": {\n" +
" \"read\": [\n" +
" \"Production Security\"\n" +
" ]\n" +
" }\n" +
"}"
)
data class ComponentDTO(val id: String, val name: String, val securityGroups: SecurityGroupsDTO)
data class ComponentDTO(
val id: String,
val name: String,
val clientCode: String?,
val parentComponent: String?,
val securityGroups: SecurityGroupsDTO
)
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ junit.version=5.8.2
jackson.version=2.14.2
postgresql.version=42.2.18
octopus-release-management.version=2.0.9
octopus-components-registry-service.version=2.0.11
octopus-components-registry-service.version=2.0.18
versions-api.version=2.0.8

docker.registry=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class ComponentsRegistryServiceImpl(
ComponentDTO(
it.id, // Component name
it.name ?: it.id, // Component display name
it.clientCode,
it.parentComponent,
SecurityGroupsDTO(it.distribution?.securityGroups?.read ?: emptyList())
)
}
Expand Down
23 changes: 23 additions & 0 deletions test-common/src/main/components-registry/TestComponents.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,29 @@
}
}

"ee-client-specific-component" {
system = "CLASSIC"
componentDisplayName = "EE Client Specific Component"
componentOwner = "EE Component Owner"
releaseManager = "EE Component Release Manager"
clientCode = "CLIENT_CODE"
parentComponent = "ee-component"
groupId = "corp.domain"
vcsUrl = "ssh://[email protected]/ee/ee-client-specific-component.git"
jira {
projectKey = 'EEC'
lineVersionFormat = '$major02.$minor02'
majorVersionFormat = '$major02.$minorC.$serviceC'
releaseVersionFormat = '$major02.$minor02.$service02.$fix02'
buildVersionFormat = '$major02.$minor02.$service02.$fix02-$build'
displayName = 'EEC Component'
}
distribution {
external = true
explicit = true
}
}

"ie-component" {
componentDisplayName = "IE Component"
componentOwner = "IE Component Owner"
Expand Down
13 changes: 13 additions & 0 deletions test-common/src/main/resources/components.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
{
"components": [
{
"id": "ee-client-specific-component",
"name": "EE Client Specific Component",
"clientCode": "CLIENT_CODE",
"parentComponent": "ee-component",
"securityGroups": {
"read": [
"Production Security"
]
}
},
{
"id": "ee-component",
"name": "EE Component",
"clientCode": null,
"parentComponent": null,
"securityGroups": {
"read": [
"Production Security"
Expand Down

0 comments on commit 96c325a

Please sign in to comment.