From 7312bb5e7bf2197e5bcfdacf1259e2eaf1f635b6 Mon Sep 17 00:00:00 2001 From: Clay McCoy Date: Wed, 1 May 2019 21:32:27 -0500 Subject: [PATCH] feat(cf): add build info to server group (#6912) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is similar to how it is represented in the AWS impl. We could probably standardize the attributes across providers. I’m using “ciBuild” rather than “buildinfo” because CF already has a “buildinfo” that refers to creating the droplet with a build pack. In the view I prefer to incorporate the link with the build number rather than show it explicitly. There is not a lot of horizontal real estate in the detail side panels. --- .../src/domain/ICloudFoundryServerGroup.ts | 8 ++++++ .../details/sections/PackageSection.tsx | 26 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/app/scripts/modules/cloudfoundry/src/domain/ICloudFoundryServerGroup.ts b/app/scripts/modules/cloudfoundry/src/domain/ICloudFoundryServerGroup.ts index 5159472309a..d25c1feb72b 100644 --- a/app/scripts/modules/cloudfoundry/src/domain/ICloudFoundryServerGroup.ts +++ b/app/scripts/modules/cloudfoundry/src/domain/ICloudFoundryServerGroup.ts @@ -16,6 +16,7 @@ export interface ICloudFoundryServerGroup extends IServerGroup { droplet?: ICloudFoundryDroplet; serviceInstances: ICloudFoundryServiceInstance[]; env: ICloudFoundryEnvVar[]; + ciBuild: ICloudFoundryBuildInfo; } export interface ICloudFoundryServiceInstance { @@ -29,3 +30,10 @@ export interface ICloudFoundryEnvVar { key: string; value: string; } + +export interface ICloudFoundryBuildInfo { + jobName: string; + jobNumber: string; + jobUrl: string; + version: string; +} diff --git a/app/scripts/modules/cloudfoundry/src/serverGroup/details/sections/PackageSection.tsx b/app/scripts/modules/cloudfoundry/src/serverGroup/details/sections/PackageSection.tsx index 55cdeafad3c..fefc952999b 100644 --- a/app/scripts/modules/cloudfoundry/src/serverGroup/details/sections/PackageSection.tsx +++ b/app/scripts/modules/cloudfoundry/src/serverGroup/details/sections/PackageSection.tsx @@ -16,6 +16,32 @@ export class PackageSection extends React.Component
+ {serverGroup.ciBuild && serverGroup.ciBuild.version && ( +
+
Version
+
{serverGroup.ciBuild.version}
+
+ )} + {serverGroup.ciBuild && serverGroup.ciBuild.jobName && ( +
+
Job
+
{serverGroup.ciBuild.jobName}
+
+ )} + {serverGroup.ciBuild && serverGroup.ciBuild.jobNumber && ( +
+
Build
+ {serverGroup.ciBuild.jobUrl ? ( +
+ + {serverGroup.ciBuild.jobNumber} + +
+ ) : ( +
{serverGroup.ciBuild.jobNumber}
+ )} +
+ )}
Checksum
{serverGroup.droplet.sourcePackage.checksum}