Skip to content

Commit adf9127

Browse files
add source-version to additional information in codebuild details (#415)
Co-authored-by: Bryan Moffatt <[email protected]>
1 parent 1ebff2c commit adf9127

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

events/codebuild.go

+2
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ type CodeBuildEventAdditionalInformation struct {
111111

112112
Source CodeBuildSource `json:"source"`
113113

114+
SourceVersion string `json:"source-version"`
115+
114116
Logs CodeBuildLogs `json:"logs"`
115117

116118
Phases []CodeBuildPhase `json:"phases"`

events/codebuild_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func TestUnmarshalCodeBuildEvent(t *testing.T) {
5959
Location: "codebuild-123456789012-input-bucket/my-input-artifact.zip",
6060
Type: "S3",
6161
},
62+
SourceVersion: "my-source-version",
6263
Logs: CodeBuildLogs{
6364
GroupName: "/aws/codebuild/my-sample-project",
6465
StreamName: "8745a7a9-c340-456a-9166-edf953571bEX",

events/testdata/codebuild-state-change.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"location": "codebuild-123456789012-input-bucket/my-input-artifact.zip",
4242
"type": "S3"
4343
},
44+
"source-version": "my-source-version",
4445
"logs": {
4546
"group-name": "/aws/codebuild/my-sample-project",
4647
"stream-name": "8745a7a9-c340-456a-9166-edf953571bEX",
@@ -56,12 +57,12 @@
5657
"phase-status": "SUCCEEDED"
5758
},
5859
{
59-
"phase-context": [],
60-
"start-time": "Sep 1, 2017 4:12:29 PM",
61-
"end-time": "Sep 13, 2019 4:12:29 AM",
62-
"duration-in-seconds": 0.0,
63-
"phase-type": "QUEUED",
64-
"phase-status": "SUCCEEDED"
60+
"phase-context": [],
61+
"start-time": "Sep 1, 2017 4:12:29 PM",
62+
"end-time": "Sep 13, 2019 4:12:29 AM",
63+
"duration-in-seconds": 0.0,
64+
"phase-type": "QUEUED",
65+
"phase-status": "SUCCEEDED"
6566
},
6667
{
6768
"phase-context": [],

0 commit comments

Comments
 (0)