Skip to content

Commit

Permalink
feat(cf): add build info to server group (spinnaker#6912)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
claymccoy authored May 2, 2019
1 parent 3b7e556 commit 7312bb5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface ICloudFoundryServerGroup extends IServerGroup {
droplet?: ICloudFoundryDroplet;
serviceInstances: ICloudFoundryServiceInstance[];
env: ICloudFoundryEnvVar[];
ciBuild: ICloudFoundryBuildInfo;
}

export interface ICloudFoundryServiceInstance {
Expand All @@ -29,3 +30,10 @@ export interface ICloudFoundryEnvVar {
key: string;
value: string;
}

export interface ICloudFoundryBuildInfo {
jobName: string;
jobNumber: string;
jobUrl: string;
version: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,32 @@ export class PackageSection extends React.Component<ICloudFoundryServerGroupDeta
{serverGroup.droplet && serverGroup.droplet.sourcePackage && (
<CollapsibleSection heading="Package" defaultExpanded={true}>
<dl className="dl-horizontal dl-flex">
{serverGroup.ciBuild && serverGroup.ciBuild.version && (
<div>
<dt>Version</dt>
<dd>{serverGroup.ciBuild.version}</dd>
</div>
)}
{serverGroup.ciBuild && serverGroup.ciBuild.jobName && (
<div>
<dt>Job</dt>
<dd>{serverGroup.ciBuild.jobName}</dd>
</div>
)}
{serverGroup.ciBuild && serverGroup.ciBuild.jobNumber && (
<div>
<dt>Build</dt>
{serverGroup.ciBuild.jobUrl ? (
<dd>
<a target="_blank" href={serverGroup.ciBuild.jobUrl}>
{serverGroup.ciBuild.jobNumber}
</a>
</dd>
) : (
<dd>{serverGroup.ciBuild.jobNumber}</dd>
)}
</div>
)}
<dt>Checksum</dt>
<dd>{serverGroup.droplet.sourcePackage.checksum}</dd>
</dl>
Expand Down

0 comments on commit 7312bb5

Please sign in to comment.