{"action":"created","issue":{"url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/2923","repository_url":"https://api.github.com/repos/SUSE-Cloud/automation","labels_url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/2923/labels{/name}","comments_url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/2923/comments","events_url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/2923/events","html_url":"https://github.com/SUSE-Cloud/automation/pull/2923","id":374076809,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1ODYxMjAy","number":2923,"title":"openstack-ardana-gerrit: custom gerrit messages","user":{"login":"stefannica","id":3963946,"node_id":"MDQ6VXNlcjM5NjM5NDY=","avatar_url":"https://avatars0.githubusercontent.com/u/3963946?v=4","gravatar_id":"","url":"https://api.github.com/users/stefannica","html_url":"https://github.com/stefannica","followers_url":"https://api.github.com/users/stefannica/followers","following_url":"https://api.github.com/users/stefannica/following{/other_user}","gists_url":"https://api.github.com/users/stefannica/gists{/gist_id}","starred_url":"https://api.github.com/users/stefannica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefannica/subscriptions","organizations_url":"https://api.github.com/users/stefannica/orgs","repos_url":"https://api.github.com/users/stefannica/repos","events_url":"https://api.github.com/users/stefannica/events{/privacy}","received_events_url":"https://api.github.com/users/stefannica/received_events","type":"User","site_admin":false},"labels":[{"id":264033521,"node_id":"MDU6TGFiZWwyNjQwMzM1MjE=","url":"https://api.github.com/repos/SUSE-Cloud/automation/labels/do%20not%20merge%20yet","name":"do not merge yet","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-25T18:35:21Z","updated_at":"2018-10-25T18:47:13Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/SUSE-Cloud/automation/pulls/2923","html_url":"https://github.com/SUSE-Cloud/automation/pull/2923","diff_url":"https://github.com/SUSE-Cloud/automation/pull/2923.diff","patch_url":"https://github.com/SUSE-Cloud/automation/pull/2923.patch"},"body":"Switches Gerrit Ardana jobs to use the Gerrit REST API for\r\nposting job results instead of relying on the Jenkins\r\nGerrit Trigger plugin.\r\n\r\nA python script was implemented for this, which can be called to post reviews\r\non Gerrit changes. The script uses pygerrit2 [1] and requires\r\nan HTTP Gerrit username/password to be added to the `.netrc`\r\nile [2]. Using the script is as simple as running:\r\n    \r\n      ./gerrit_review.py --label 'Code-Review' --vote +1 --message 'LGTM' 1234\r\n    \r\nExamples of the type of message that will reported to Gerrit after this change:\r\n- build started:\r\n```\r\nSUSE Jenkins Gerrit\r\nPatch Set 2: -Verified\r\nStarted build (openstack-ardana-gerrit-cloud9): https://ci.suse.de/job/openstack-ardana-gerrit-cloud9/13/\r\n\r\nThe following links can also be used to track the results:\r\n - live console output: https://ci.suse.de/job/openstack-ardana-gerrit-cloud9/13/console\r\n - live pipeline job view: https://ci.suse.de/job/openstack-ardana-gerrit-cloud9/13/display/redirect\r\n```\r\n- build failed:\r\n```\r\nPatch Set 2: Verified-1\r\nBuild failed (openstack-ardana-gerrit-cloud9): https://ci.suse.de/job/openstack-ardana-gerrit-cloud9/12/\r\n- validate commit message: PASSED (https://ci.suse.de/job/openstack-ardana-gerrit-cloud9/12//console)\r\n- integration test: FAILED (https://ci.suse.de/job/openstack-ardana/111/display/redirect)\r\n```\r\n- build succeeded:\r\n```\r\nPatch Set 2: Verified+1\r\nBuild succeeded (openstack-ardana-gerrit-cloud9): https://ci.suse.de/job/openstack-ardana-gerrit-cloud9/13/\r\n- validate commit message: PASSED (https://ci.suse.de/job/openstack-ardana-gerrit-cloud9/13/console)\r\n- integration test: PASSED (https://ci.suse.de/job/openstack-ardana/111/display/redirect)\r\n```\r\n\r\n\r\nNOTE: the composed message is just a preview of a more detailed version that will be generated in a following PR using the Pipeline REST API Plugin [3]\r\n\r\n[1] https://github.com/dpursehouse/pygerrit2\r\n[2] https://github.com/dpursehouse/pygerrit2#usage\r\n[3] https://github.com/jenkinsci/pipeline-stage-view-plugin/tree/master/rest-api\r\n"},"comment":{"url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/comments/433163528","html_url":"https://github.com/SUSE-Cloud/automation/pull/2923#issuecomment-433163528","issue_url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/2923","id":433163528,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzE2MzUyOA==","user":{"login":"stefannica","id":3963946,"node_id":"MDQ6VXNlcjM5NjM5NDY=","avatar_url":"https://avatars0.githubusercontent.com/u/3963946?v=4","gravatar_id":"","url":"https://api.github.com/users/stefannica","html_url":"https://github.com/stefannica","followers_url":"https://api.github.com/users/stefannica/followers","following_url":"https://api.github.com/users/stefannica/following{/other_user}","gists_url":"https://api.github.com/users/stefannica/gists{/gist_id}","starred_url":"https://api.github.com/users/stefannica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefannica/subscriptions","organizations_url":"https://api.github.com/users/stefannica/orgs","repos_url":"https://api.github.com/users/stefannica/repos","events_url":"https://api.github.com/users/stefannica/events{/privacy}","received_events_url":"https://api.github.com/users/stefannica/received_events","type":"User","site_admin":false},"created_at":"2018-10-25T18:47:13Z","updated_at":"2018-10-25T18:47:13Z","author_association":"CONTRIBUTOR","body":"@jdsn we need `pygerrit2` and the gerrit user/password added to the `.netrc` file on the `cloud-pipeline` Jenkins agent before this can be functional."}}
{"actor":{"display_login":"stefannica"}}