Skip to content

add source-version to additional information in codebuild details #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions events/codebuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ type CodeBuildEventAdditionalInformation struct {

Source CodeBuildSource `json:"source"`

SourceVersion string `json:"source-version"`

Logs CodeBuildLogs `json:"logs"`

Phases []CodeBuildPhase `json:"phases"`
Expand Down
1 change: 1 addition & 0 deletions events/codebuild_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func TestUnmarshalCodeBuildEvent(t *testing.T) {
Location: "codebuild-123456789012-input-bucket/my-input-artifact.zip",
Type: "S3",
},
SourceVersion: "my-source-version",
Logs: CodeBuildLogs{
GroupName: "/aws/codebuild/my-sample-project",
StreamName: "8745a7a9-c340-456a-9166-edf953571bEX",
Expand Down
13 changes: 7 additions & 6 deletions events/testdata/codebuild-state-change.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"location": "codebuild-123456789012-input-bucket/my-input-artifact.zip",
"type": "S3"
},
"source-version": "my-source-version",
"logs": {
"group-name": "/aws/codebuild/my-sample-project",
"stream-name": "8745a7a9-c340-456a-9166-edf953571bEX",
Expand All @@ -55,12 +56,12 @@
"phase-status": "SUCCEEDED"
},
{
"phase-context": [],
"start-time": "Sep 1, 2017 4:12:29 PM",
"end-time": "Sep 13, 2019 4:12:29 AM",
"duration-in-seconds": 0.0,
"phase-type": "QUEUED",
"phase-status": "SUCCEEDED"
"phase-context": [],
"start-time": "Sep 1, 2017 4:12:29 PM",
"end-time": "Sep 13, 2019 4:12:29 AM",
"duration-in-seconds": 0.0,
"phase-type": "QUEUED",
"phase-status": "SUCCEEDED"
},
{
"phase-context": [],
Expand Down