{"action":"opened","issue":{"url":"https://api.github.com/repos/mozilla/network/issues/496","repository_url":"https://api.github.com/repos/mozilla/network","labels_url":"https://api.github.com/repos/mozilla/network/issues/496/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/network/issues/496/comments","events_url":"https://api.github.com/repos/mozilla/network/issues/496/events","html_url":"https://github.com/mozilla/network/issues/496","id":234236913,"number":496,"title":"Git info not available for healthcheck if the build was triggered manually","user":{"login":"cadecairos","id":438003,"avatar_url":"https://avatars2.githubusercontent.com/u/438003?v=3","gravatar_id":"","url":"https://api.github.com/users/cadecairos","html_url":"https://github.com/cadecairos","followers_url":"https://api.github.com/users/cadecairos/followers","following_url":"https://api.github.com/users/cadecairos/following{/other_user}","gists_url":"https://api.github.com/users/cadecairos/gists{/gist_id}","starred_url":"https://api.github.com/users/cadecairos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cadecairos/subscriptions","organizations_url":"https://api.github.com/users/cadecairos/orgs","repos_url":"https://api.github.com/users/cadecairos/repos","events_url":"https://api.github.com/users/cadecairos/events{/privacy}","received_events_url":"https://api.github.com/users/cadecairos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-07T14:51:07Z","updated_at":"2017-06-07T14:51:07Z","closed_at":null,"body":"If we trigger a build manually, and not via github webhook, there's no changeset data available on the JSON endpoint we're hitting. this is causing failed builds.\r\n\r\nI propose we add in a build step that generates a json file containing the commit hash, and safe it as an artifact. Then we XHR it and use that instead.\r\n\r\n```\r\ncat <<EOF > commit_info.json\r\n{\"commitId\" : \"$GIT_COMMIT\"}\r\nEOF\r\n```\r\n\r\n`https://jenkins.mofoprod.net/job/%7BNetwork_Job%7D/lastSuccessfulBuild/artifact/commit_info.json`\r\n\r\nWe should:\r\n\r\n1. Disable the git information portion of the healthcheck\r\n2. Add the build step to jenkins that generates the json, and copy it to the build artifacts directory\r\n3. run a successful build to generate JSON\r\n4. Re-enable the build, update code and env vars"}}
{"actor":{"display_login":"cadecairos"}}