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

Accepted Merge Request Events and Closed Merge Request Events features not triggered build #740

Closed
Zava2012 opened this issue Apr 5, 2018 · 4 comments

Comments

@Zava2012
Copy link

Zava2012 commented Apr 5, 2018

Issue

Context

  • Gitlab plugin version: 1.5.5
  • Gitlab version: 10.6.2
  • Jenkins version: 2.107.1 LTS
  • Job type: Freestyle

Logs & Traces

Closed Merge Request Event Log:

Apr 05, 2018 10:59:34 AM INFO com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
WebHook called with url: /project/TEST/TEST_Plugin
Apr 05, 2018 10:59:34 AM FINE com.dabsquared.gitlabjenkins.webhook.build.MergeRequestBuildAction
MergeRequest: {
  "object_kind" : "merge_request",
  "user" : {
    "name" : "My Name",
    "username" : "MyUser",
    "avatar_url" : "https://gitlab.com/uploads/-/system/user/avatar/31/avatar.png"
  },
  "project" : {
    "id" : 239,
    "name" : "temporary",
    "description" : "",
    "web_url" : "https://gitlab.com/MyUser/temporary",
    "avatar_url" : null,
    "git_ssh_url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
    "git_http_url" : "https://gitlab.com/MyUser/temporary.git",
    "namespace" : "MyUser",
    "visibility_level" : 0,
    "path_with_namespace" : "MyUser/temporary",
    "default_branch" : "development",
    "ci_config_path" : null,
    "homepage" : "https://gitlab.com/MyUser/temporary",
    "url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
    "ssh_url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
    "http_url" : "https://gitlab.com/MyUser/temporary.git"
  },
  "object_attributes" : {
    "assignee_id" : null,
    "author_id" : 31,
    "created_at" : "2018-04-05 10:58:58 +0300",
    "description" : "",
    "head_pipeline_id" : null,
    "id" : 2608,
    "iid" : 7,
    "last_edited_at" : null,
    "last_edited_by_id" : null,
    "merge_commit_sha" : null,
    "merge_error" : null,
    "merge_params" : {
      "force_remove_source_branch" : "0"
    },
    "merge_status" : "can_be_merged",
    "merge_user_id" : null,
    "merge_when_pipeline_succeeds" : false,
    "milestone_id" : null,
    "source_branch" : "bugfix/test",
    "source_project_id" : 239,
    "state" : "closed",
    "target_branch" : "development",
    "target_project_id" : 239,
    "time_estimate" : 0,
    "title" : "Update .TEST",
    "updated_at" : "2018-04-05 10:59:34 +0300",
    "updated_by_id" : null,
    "url" : "https://gitlab.com/MyUser/temporary/merge_requests/7",
    "source" : {
      "id" : 239,
      "name" : "temporary",
      "description" : "",
      "web_url" : "https://gitlab.com/MyUser/temporary",
      "avatar_url" : null,
      "git_ssh_url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
      "git_http_url" : "https://gitlab.com/MyUser/temporary.git",
      "namespace" : "MyUser",
      "visibility_level" : 0,
      "path_with_namespace" : "MyUser/temporary",
      "default_branch" : "development",
      "ci_config_path" : null,
      "homepage" : "https://gitlab.com/MyUser/temporary",
      "url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
      "ssh_url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
      "http_url" : "https://gitlab.com/MyUser/temporary.git"
    },
    "target" : {
      "id" : 239,
      "name" : "temporary",
      "description" : "",
      "web_url" : "https://gitlab.com/MyUser/temporary",
      "avatar_url" : null,
      "git_ssh_url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
      "git_http_url" : "https://gitlab.com/MyUser/temporary.git",
      "namespace" : "MyUser",
      "visibility_level" : 0,
      "path_with_namespace" : "MyUser/temporary",
      "default_branch" : "development",
      "ci_config_path" : null,
      "homepage" : "https://gitlab.com/MyUser/temporary",
      "url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
      "ssh_url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
      "http_url" : "https://gitlab.com/MyUser/temporary.git"
    },
    "last_commit" : {
      "id" : "e2b152c8d8b405ab238847a47b949022b0f8f621",
      "message" : "Update .TEST",
      "timestamp" : "2018-04-05T07:57:42+00:00",
      "url" : "https://gitlab.com/MyUser/temporary/commit/e2b152c8d8b405ab238847a47b949022b0f8f621",
      "author" : {
        "name" : "My Name",
        "email" : "MyUser@gmail.com"
      }
    },
    "work_in_progress" : false,
    "total_time_spent" : 0,
    "human_total_time_spent" : null,
    "human_time_estimate" : null,
    "action" : "close"
  },
  "labels" : [ ],
  "changes" : {
    "state" : {
      "previous" : "opened",
      "current" : "closed"
    },
    "updated_at" : {
      "previous" : "2018-04-05 10:58:58 +0300",
      "current" : "2018-04-05 10:59:34 +0300"
    },
    "total_time_spent" : {
      "previous" : null,
      "current" : 0
    }
  },
  "repository" : {
    "name" : "temporary",
    "url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
    "description" : "",
    "homepage" : "https://gitlab.com/MyUser/temporary"
  }
}

Accepted Merge Request Event Log:

Apr 05, 2018 11:00:15 AM INFO com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
WebHook called with url: /project/TEST/TEST_Plugin
Apr 05, 2018 11:00:15 AM FINE com.dabsquared.gitlabjenkins.webhook.build.MergeRequestBuildAction
MergeRequest: {
  "object_kind" : "merge_request",
  "user" : {
    "name" : "My Name",
    "username" : "MyUser",
    "avatar_url" : "https://gitlab.com/uploads/-/system/user/avatar/31/avatar.png"
  },
  "project" : {
    "id" : 239,
    "name" : "temporary",
    "description" : "",
    "web_url" : "https://gitlab.com/MyUser/temporary",
    "avatar_url" : null,
    "git_ssh_url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
    "git_http_url" : "https://gitlab.com/MyUser/temporary.git",
    "namespace" : "MyUser",
    "visibility_level" : 0,
    "path_with_namespace" : "MyUser/temporary",
    "default_branch" : "development",
    "ci_config_path" : null,
    "homepage" : "https://gitlab.com/MyUser/temporary",
    "url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
    "ssh_url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
    "http_url" : "https://gitlab.com/MyUser/temporary.git"
  },
  "object_attributes" : {
    "assignee_id" : null,
    "author_id" : 31,
    "created_at" : "2018-04-05 08:00:05 UTC",
    "description" : "",
    "head_pipeline_id" : null,
    "id" : 2609,
    "iid" : 8,
    "last_edited_at" : null,
    "last_edited_by_id" : null,
    "merge_commit_sha" : "623931f630e6e328359f95b84a13ad9772aadf30",
    "merge_error" : null,
    "merge_params" : {
      "force_remove_source_branch" : "0"
    },
    "merge_status" : "can_be_merged",
    "merge_user_id" : null,
    "merge_when_pipeline_succeeds" : false,
    "milestone_id" : null,
    "source_branch" : "bugfix/test",
    "source_project_id" : 239,
    "state" : "merged",
    "target_branch" : "development",
    "target_project_id" : 239,
    "time_estimate" : 0,
    "title" : "Bugfix/test",
    "updated_at" : "2018-04-05 08:00:15 UTC",
    "updated_by_id" : null,
    "url" : "https://gitlab.com/MyUser/temporary/merge_requests/8",
    "source" : {
      "id" : 239,
      "name" : "temporary",
      "description" : "",
      "web_url" : "https://gitlab.com/MyUser/temporary",
      "avatar_url" : null,
      "git_ssh_url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
      "git_http_url" : "https://gitlab.com/MyUser/temporary.git",
      "namespace" : "MyUser",
      "visibility_level" : 0,
      "path_with_namespace" : "MyUser/temporary",
      "default_branch" : "development",
      "ci_config_path" : null,
      "homepage" : "https://gitlab.com/MyUser/temporary",
      "url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
      "ssh_url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
      "http_url" : "https://gitlab.com/MyUser/temporary.git"
    },
    "target" : {
      "id" : 239,
      "name" : "temporary",
      "description" : "",
      "web_url" : "https://gitlab.com/MyUser/temporary",
      "avatar_url" : null,
      "git_ssh_url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
      "git_http_url" : "https://gitlab.com/MyUser/temporary.git",
      "namespace" : "MyUser",
      "visibility_level" : 0,
      "path_with_namespace" : "MyUser/temporary",
      "default_branch" : "development",
      "ci_config_path" : null,
      "homepage" : "https://gitlab.com/MyUser/temporary",
      "url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
      "ssh_url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
      "http_url" : "https://gitlab.com/MyUser/temporary.git"
    },
    "last_commit" : {
      "id" : "17539131f3696b717631a7259ccf9b6a94c179af",
      "message" : "Update .TEST",
      "timestamp" : "2018-04-05T08:00:00+00:00",
      "url" : "https://gitlab.com/MyUser/temporary/commit/17539131f3696b717631a7259ccf9b6a94c179af",
      "author" : {
        "name" : "My Name",
        "email" : "MyUser@gmail.com"
      }
    },
    "work_in_progress" : false,
    "total_time_spent" : 0,
    "human_total_time_spent" : null,
    "human_time_estimate" : null,
    "action" : "merge"
  },
  "labels" : [ ],
  "changes" : {
    "state" : {
      "previous" : "locked",
      "current" : "merged"
    },
    "updated_at" : {
      "previous" : "2018-04-05 08:00:15 UTC",
      "current" : "2018-04-05 08:00:15 UTC"
    },
    "total_time_spent" : {
      "previous" : null,
      "current" : 0
    }
  },
  "repository" : {
    "name" : "temporary",
    "url" : "ssh://git@gitlab.com:2222/MyUser/temporary.git",
    "description" : "",
    "homepage" : "https://gitlab.com/MyUser/temporary"
  }
}

Problem description

Build not triggered when checkbox setup on Accepted Merge Request Events and/or Closed Merge Request Events features.
Opened Merge Request Events and Push Events working perfectly.

@valVk
Copy link

valVk commented Apr 5, 2018

I have this issue too.

@benjarobin
Copy link
Contributor

@pdudits
Copy link
Contributor

pdudits commented Apr 5, 2018

This duplicates #734 . I also started looking at it, and it also showed, that MergeRequestBuildActionTest was a Volkswagen test (always green, even if things are actually broken). I might submit a PR as well.

@Zava2012
Copy link
Author

Zava2012 commented Apr 5, 2018

@pdudits, i'm sorry for duplicate issue. Again I am not careful (

@omehegan omehegan closed this as completed Apr 6, 2018
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

No branches or pull requests

5 participants