{"action":"created","issue":{"url":"https://api.github.com/repos/JFrogDev/jenkins-artifactory-plugin/issues/28","repository_url":"https://api.github.com/repos/JFrogDev/jenkins-artifactory-plugin","labels_url":"https://api.github.com/repos/JFrogDev/jenkins-artifactory-plugin/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/JFrogDev/jenkins-artifactory-plugin/issues/28/comments","events_url":"https://api.github.com/repos/JFrogDev/jenkins-artifactory-plugin/issues/28/events","html_url":"https://github.com/JFrogDev/jenkins-artifactory-plugin/pull/28","id":172932116,"number":28,"title":"Only git push after build is successful (avoid intermediate pushes) - fixes HAP-809","user":{"login":"KostaCitrix","id":10960644,"avatar_url":"https://avatars.githubusercontent.com/u/10960644?v=3","gravatar_id":"","url":"https://api.github.com/users/KostaCitrix","html_url":"https://github.com/KostaCitrix","followers_url":"https://api.github.com/users/KostaCitrix/followers","following_url":"https://api.github.com/users/KostaCitrix/following{/other_user}","gists_url":"https://api.github.com/users/KostaCitrix/gists{/gist_id}","starred_url":"https://api.github.com/users/KostaCitrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KostaCitrix/subscriptions","organizations_url":"https://api.github.com/users/KostaCitrix/orgs","repos_url":"https://api.github.com/users/KostaCitrix/repos","events_url":"https://api.github.com/users/KostaCitrix/events{/privacy}","received_events_url":"https://api.github.com/users/KostaCitrix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-24T11:53:27Z","updated_at":"2016-08-31T09:37:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JFrogDev/jenkins-artifactory-plugin/pulls/28","html_url":"https://github.com/JFrogDev/jenkins-artifactory-plugin/pull/28","diff_url":"https://github.com/JFrogDev/jenkins-artifactory-plugin/pull/28.diff","patch_url":"https://github.com/JFrogDev/jenkins-artifactory-plugin/pull/28.patch"},"body":"Hi!\r\n\r\nI created [HAP-809](https://www.jfrog.com/jira/browse/HAP-809) and this PR fixes it.\r\n\r\nSee that issue for more details, but basically this changes the ordering of the release build like this:\r\n* After setting the release version, commit & tag immediately, so that the release build has the right commit and the working directory is clean\r\n* Only push at the very end (both branches if there's a release branch), so that we never have to delete a remote branch. We only do one single push in the non-release-branch case which can avoid issues with git repo post-commit-hooks that can cause two release builds on our systems. (One being triggered by the plugin and one by the post-commit hook of the release version on the master branch)\r\n\r\nThis is currently untested. What kind of unit tests make sense here? I will test this on our jenkins dev instance and get back to you. In the meantime, I would be very happy if you could comment on the code itself and whether you're willing to merge it in general.\r\n\r\nThanks in advance!\r\n\r\nCheers,\r\nKosta"},"comment":{"url":"https://api.github.com/repos/JFrogDev/jenkins-artifactory-plugin/issues/comments/243711780","html_url":"https://github.com/JFrogDev/jenkins-artifactory-plugin/pull/28#issuecomment-243711780","issue_url":"https://api.github.com/repos/JFrogDev/jenkins-artifactory-plugin/issues/28","id":243711780,"user":{"login":"KostaCitrix","id":10960644,"avatar_url":"https://avatars.githubusercontent.com/u/10960644?v=3","gravatar_id":"","url":"https://api.github.com/users/KostaCitrix","html_url":"https://github.com/KostaCitrix","followers_url":"https://api.github.com/users/KostaCitrix/followers","following_url":"https://api.github.com/users/KostaCitrix/following{/other_user}","gists_url":"https://api.github.com/users/KostaCitrix/gists{/gist_id}","starred_url":"https://api.github.com/users/KostaCitrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KostaCitrix/subscriptions","organizations_url":"https://api.github.com/users/KostaCitrix/orgs","repos_url":"https://api.github.com/users/KostaCitrix/repos","events_url":"https://api.github.com/users/KostaCitrix/events{/privacy}","received_events_url":"https://api.github.com/users/KostaCitrix/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T09:37:21Z","updated_at":"2016-08-31T09:37:21Z","body":"Hi!\r\n\r\nThanks for taking a look at my PR! I'm not sure how my PR affects the behaviour you describe. The local git should behave exactly the same.\r\n\r\nThe only thing that changed in case of unsuccessful build (we're talking about the `else` in `buildCompleted()`, right?) is that we don't have to delete the remote git branch because we did not push it yet.\r\n\r\nPlease let me know how I can improve the \"local git cache\" behaviour and I'd be happy to implement it.\r\n\r\nCheers,\r\nKosta"}}
{"actor":{"display_login":"KostaCitrix"}}