Skip to content
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

Add handling for job hooks with build payloads #107

Merged
merged 3 commits into from
Jan 21, 2021

Conversation

zrochler
Copy link
Contributor

I went with a similar approach to system hooks in requiring that both job and build events be requested so the caller has to be aware of this combination.

Fixes #95

@@ -139,7 +139,7 @@ type BuildEventPayload struct {
BuildStatus string `json:"build_status"`
BuildStartedAt customTime `json:"build_started_at"`
BuildFinishedAt customTime `json:"build_finished_at"`
BuildDuration int64 `json:"build_duration"`
BuildDuration float64 `json:"build_duration"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some doubts here @zrochler in terms of backward compatibility... Due to documentation you should be right, but is it possible, that smbd already used this payload in old way...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Toshik1978 you're probably right. I don't remember what specifically led me to that change and whether it was because I saw it misbehaving, but I undid that change to avoid breaking anyone.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zrochler Zach, but it's a good question actually. Do we have float or int in real payload?
I'm preparing v6 branch at this moment. So we can do backward incompatible changes during 6.0.0 release.

@Toshik1978 Toshik1978 changed the base branch from v5 to v6 January 21, 2021 16:18
@Toshik1978 Toshik1978 merged commit cd70db9 into go-playground:v6 Jan 21, 2021
@zrochler zrochler deleted the gitlab-job-hook-build-payload branch May 7, 2021 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Job events are now sent by Gitlab as build event payload
2 participants