{"action":"created","comment":{"url":"https://api.github.com/repos/KSP-CKAN/NetKAN/pulls/comments/34018137","id":34018137,"diff_hunk":"@@ -24,33 +133,28 @@ then\n     exit 0\n fi\n \n-echo Fetching latest ckan.exe\n+# Check JSON.\n+echo \"Running jsonlint on the changed files\"\n+echo \"If you get an error below you should look for syntax errors in the metadata\"\n \n-# fetch latest ckan.exe\n-wget --quiet http://ci.ksp-ckan.org:8080/job/CKAN/lastSuccessfulBuild/artifact/ckan.exe -O ckan.exe\n+jsonlint -s -v ${COMMIT_CHANGES}\n \n-echo Creating a dummy KSP install\n+# Create folders.\n+mkdir built\n+mkdir downloads_cache # TODO: Point to cache folder here instead if possible.\n \n-# create a dummy KSP install\n-if [ \"${USER}\" = \"jenkins\" ]\n-then\n-    REGISTRY_FILE=${HOME}/.mono/registry/CurrentUser/software/ckan/values.xml\n-    if [ -r ${REGISTRY_FILE} ]\n-    then\n-        rm -f ${REGISTRY_FILE}\n-    fi\n-fi\n+# Fetch latest ckan and netkan executable.\n+echo \"Fetching latest ckan.exe\"\n+wget --quiet http://ci.ksp-ckan.org:8080/job/CKAN/lastSuccessfulBuild/artifact/ckan.exe -O ckan.exe\n+\n+echo \"Fetching latest netkan.exe\"\n+wget --quiet http://ci.ksp-ckan.org:8080/job/NetKAN/lastSuccessfulBuild/artifact/netkan.exe -O netkan.exe\n ","path":"build.sh","position":171,"original_position":171,"commit_id":"d54ec234107b491270264d0c9b457768e4a56192","original_commit_id":"d54ec234107b491270264d0c9b457768e4a56192","user":{"login":"techman83","id":3467784,"avatar_url":"https://avatars.githubusercontent.com/u/3467784?v=3","gravatar_id":"","url":"https://api.github.com/users/techman83","html_url":"https://github.com/techman83","followers_url":"https://api.github.com/users/techman83/followers","following_url":"https://api.github.com/users/techman83/following{/other_user}","gists_url":"https://api.github.com/users/techman83/gists{/gist_id}","starred_url":"https://api.github.com/users/techman83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techman83/subscriptions","organizations_url":"https://api.github.com/users/techman83/orgs","repos_url":"https://api.github.com/users/techman83/repos","events_url":"https://api.github.com/users/techman83/events{/privacy}","received_events_url":"https://api.github.com/users/techman83/received_events","type":"User","site_admin":false},"body":"These have been changed. Probably worth setting them at the top of the script to make them easier to update.\r\n\r\nhttp://ckan-travis.s3.amazonaws.com/ckan.exe\r\nhttp://ckan-travis.s3.amazonaws.com/netkan.exe","created_at":"2015-07-07T08:35:17Z","updated_at":"2015-07-07T08:35:17Z","html_url":"https://github.com/KSP-CKAN/NetKAN/pull/1423#discussion_r34018137","pull_request_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/pulls/1423","_links":{"self":{"href":"https://api.github.com/repos/KSP-CKAN/NetKAN/pulls/comments/34018137"},"html":{"href":"https://github.com/KSP-CKAN/NetKAN/pull/1423#discussion_r34018137"},"pull_request":{"href":"https://api.github.com/repos/KSP-CKAN/NetKAN/pulls/1423"}}},"pull_request":{"url":"https://api.github.com/repos/KSP-CKAN/NetKAN/pulls/1423","id":36175082,"html_url":"https://github.com/KSP-CKAN/NetKAN/pull/1423","diff_url":"https://github.com/KSP-CKAN/NetKAN/pull/1423.diff","patch_url":"https://github.com/KSP-CKAN/NetKAN/pull/1423.patch","issue_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/issues/1423","number":1423,"state":"open","locked":false,"title":"Build script update","user":{"login":"mgsdk","id":856309,"avatar_url":"https://avatars.githubusercontent.com/u/856309?v=3","gravatar_id":"","url":"https://api.github.com/users/mgsdk","html_url":"https://github.com/mgsdk","followers_url":"https://api.github.com/users/mgsdk/followers","following_url":"https://api.github.com/users/mgsdk/following{/other_user}","gists_url":"https://api.github.com/users/mgsdk/gists{/gist_id}","starred_url":"https://api.github.com/users/mgsdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgsdk/subscriptions","organizations_url":"https://api.github.com/users/mgsdk/orgs","repos_url":"https://api.github.com/users/mgsdk/repos","events_url":"https://api.github.com/users/mgsdk/events{/privacy}","received_events_url":"https://api.github.com/users/mgsdk/received_events","type":"User","site_admin":false},"body":"Currently the build script for Jenkins fails if:\r\n* The PR contains multiple files with inter-dependencies (e.g. https://github.com/KSP-CKAN/NetKAN/pull/1145).\r\n* The KSP version is not the latest (e.g. https://github.com/KSP-CKAN/NetKAN/pull/1420).\r\n\r\nThis attempts to solve this by:\r\n* Use a local metadata file in the form of master.tar.gz, which contains all .ckan files but the one being tested.\r\n* Create dummy KSP installs matching the min KSP version requested by the .ckan file being tested.\r\n\r\nWill depend on the static build of https://github.com/stedolan/jq (Not included in this PR) to extract json identifiers.\r\n\r\nAny comments welcome, shell scripting is not my force.\r\n\r\nTested on https://github.com/KSP-CKAN/NetKAN/pull/1420 without error locally. My git-fu is not strong enough to figure out how to do a test along the lines of https://github.com/KSP-CKAN/NetKAN/pull/1145.","created_at":"2015-05-26T07:19:15Z","updated_at":"2015-07-07T08:35:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2d2901c8669357a51e1d6aacc104c89a437274ce","assignee":{"login":"pjf","id":12072,"avatar_url":"https://avatars.githubusercontent.com/u/12072?v=3","gravatar_id":"","url":"https://api.github.com/users/pjf","html_url":"https://github.com/pjf","followers_url":"https://api.github.com/users/pjf/followers","following_url":"https://api.github.com/users/pjf/following{/other_user}","gists_url":"https://api.github.com/users/pjf/gists{/gist_id}","starred_url":"https://api.github.com/users/pjf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjf/subscriptions","organizations_url":"https://api.github.com/users/pjf/orgs","repos_url":"https://api.github.com/users/pjf/repos","events_url":"https://api.github.com/users/pjf/events{/privacy}","received_events_url":"https://api.github.com/users/pjf/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/pulls/1423/commits","review_comments_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/pulls/1423/comments","review_comment_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/issues/1423/comments","statuses_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/statuses/d54ec234107b491270264d0c9b457768e4a56192","head":{"label":"mgsdk:build_script_update","ref":"build_script_update","sha":"d54ec234107b491270264d0c9b457768e4a56192","user":{"login":"mgsdk","id":856309,"avatar_url":"https://avatars.githubusercontent.com/u/856309?v=3","gravatar_id":"","url":"https://api.github.com/users/mgsdk","html_url":"https://github.com/mgsdk","followers_url":"https://api.github.com/users/mgsdk/followers","following_url":"https://api.github.com/users/mgsdk/following{/other_user}","gists_url":"https://api.github.com/users/mgsdk/gists{/gist_id}","starred_url":"https://api.github.com/users/mgsdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgsdk/subscriptions","organizations_url":"https://api.github.com/users/mgsdk/orgs","repos_url":"https://api.github.com/users/mgsdk/repos","events_url":"https://api.github.com/users/mgsdk/events{/privacy}","received_events_url":"https://api.github.com/users/mgsdk/received_events","type":"User","site_admin":false},"repo":{"id":28588413,"name":"NetKAN","full_name":"mgsdk/NetKAN","owner":{"login":"mgsdk","id":856309,"avatar_url":"https://avatars.githubusercontent.com/u/856309?v=3","gravatar_id":"","url":"https://api.github.com/users/mgsdk","html_url":"https://github.com/mgsdk","followers_url":"https://api.github.com/users/mgsdk/followers","following_url":"https://api.github.com/users/mgsdk/following{/other_user}","gists_url":"https://api.github.com/users/mgsdk/gists{/gist_id}","starred_url":"https://api.github.com/users/mgsdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgsdk/subscriptions","organizations_url":"https://api.github.com/users/mgsdk/orgs","repos_url":"https://api.github.com/users/mgsdk/repos","events_url":"https://api.github.com/users/mgsdk/events{/privacy}","received_events_url":"https://api.github.com/users/mgsdk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mgsdk/NetKAN","description":"Metadata files used by the NetKAN/CKAN indexer","fork":true,"url":"https://api.github.com/repos/mgsdk/NetKAN","forks_url":"https://api.github.com/repos/mgsdk/NetKAN/forks","keys_url":"https://api.github.com/repos/mgsdk/NetKAN/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mgsdk/NetKAN/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mgsdk/NetKAN/teams","hooks_url":"https://api.github.com/repos/mgsdk/NetKAN/hooks","issue_events_url":"https://api.github.com/repos/mgsdk/NetKAN/issues/events{/number}","events_url":"https://api.github.com/repos/mgsdk/NetKAN/events","assignees_url":"https://api.github.com/repos/mgsdk/NetKAN/assignees{/user}","branches_url":"https://api.github.com/repos/mgsdk/NetKAN/branches{/branch}","tags_url":"https://api.github.com/repos/mgsdk/NetKAN/tags","blobs_url":"https://api.github.com/repos/mgsdk/NetKAN/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mgsdk/NetKAN/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mgsdk/NetKAN/git/refs{/sha}","trees_url":"https://api.github.com/repos/mgsdk/NetKAN/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mgsdk/NetKAN/statuses/{sha}","languages_url":"https://api.github.com/repos/mgsdk/NetKAN/languages","stargazers_url":"https://api.github.com/repos/mgsdk/NetKAN/stargazers","contributors_url":"https://api.github.com/repos/mgsdk/NetKAN/contributors","subscribers_url":"https://api.github.com/repos/mgsdk/NetKAN/subscribers","subscription_url":"https://api.github.com/repos/mgsdk/NetKAN/subscription","commits_url":"https://api.github.com/repos/mgsdk/NetKAN/commits{/sha}","git_commits_url":"https://api.github.com/repos/mgsdk/NetKAN/git/commits{/sha}","comments_url":"https://api.github.com/repos/mgsdk/NetKAN/comments{/number}","issue_comment_url":"https://api.github.com/repos/mgsdk/NetKAN/issues/comments{/number}","contents_url":"https://api.github.com/repos/mgsdk/NetKAN/contents/{+path}","compare_url":"https://api.github.com/repos/mgsdk/NetKAN/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mgsdk/NetKAN/merges","archive_url":"https://api.github.com/repos/mgsdk/NetKAN/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mgsdk/NetKAN/downloads","issues_url":"https://api.github.com/repos/mgsdk/NetKAN/issues{/number}","pulls_url":"https://api.github.com/repos/mgsdk/NetKAN/pulls{/number}","milestones_url":"https://api.github.com/repos/mgsdk/NetKAN/milestones{/number}","notifications_url":"https://api.github.com/repos/mgsdk/NetKAN/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mgsdk/NetKAN/labels{/name}","releases_url":"https://api.github.com/repos/mgsdk/NetKAN/releases{/id}","created_at":"2014-12-29T10:19:36Z","updated_at":"2015-02-14T10:48:41Z","pushed_at":"2015-05-27T20:30:40Z","git_url":"git://github.com/mgsdk/NetKAN.git","ssh_url":"git@github.com:mgsdk/NetKAN.git","clone_url":"https://github.com/mgsdk/NetKAN.git","svn_url":"https://github.com/mgsdk/NetKAN","homepage":null,"size":3376,"stargazers_count":0,"watchers_count":0,"language":"Perl","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"KSP-CKAN:master","ref":"master","sha":"ca630f4f7e3ae8554f82bdf3ea62d7dadc57a91b","user":{"login":"KSP-CKAN","id":9023970,"avatar_url":"https://avatars.githubusercontent.com/u/9023970?v=3","gravatar_id":"","url":"https://api.github.com/users/KSP-CKAN","html_url":"https://github.com/KSP-CKAN","followers_url":"https://api.github.com/users/KSP-CKAN/followers","following_url":"https://api.github.com/users/KSP-CKAN/following{/other_user}","gists_url":"https://api.github.com/users/KSP-CKAN/gists{/gist_id}","starred_url":"https://api.github.com/users/KSP-CKAN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KSP-CKAN/subscriptions","organizations_url":"https://api.github.com/users/KSP-CKAN/orgs","repos_url":"https://api.github.com/users/KSP-CKAN/repos","events_url":"https://api.github.com/users/KSP-CKAN/events{/privacy}","received_events_url":"https://api.github.com/users/KSP-CKAN/received_events","type":"Organization","site_admin":false},"repo":{"id":26194951,"name":"NetKAN","full_name":"KSP-CKAN/NetKAN","owner":{"login":"KSP-CKAN","id":9023970,"avatar_url":"https://avatars.githubusercontent.com/u/9023970?v=3","gravatar_id":"","url":"https://api.github.com/users/KSP-CKAN","html_url":"https://github.com/KSP-CKAN","followers_url":"https://api.github.com/users/KSP-CKAN/followers","following_url":"https://api.github.com/users/KSP-CKAN/following{/other_user}","gists_url":"https://api.github.com/users/KSP-CKAN/gists{/gist_id}","starred_url":"https://api.github.com/users/KSP-CKAN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KSP-CKAN/subscriptions","organizations_url":"https://api.github.com/users/KSP-CKAN/orgs","repos_url":"https://api.github.com/users/KSP-CKAN/repos","events_url":"https://api.github.com/users/KSP-CKAN/events{/privacy}","received_events_url":"https://api.github.com/users/KSP-CKAN/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/KSP-CKAN/NetKAN","description":"Metadata files used by the NetKAN/CKAN indexer","fork":false,"url":"https://api.github.com/repos/KSP-CKAN/NetKAN","forks_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/forks","keys_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/teams","hooks_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/hooks","issue_events_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/issues/events{/number}","events_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/events","assignees_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/assignees{/user}","branches_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/branches{/branch}","tags_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/tags","blobs_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/git/refs{/sha}","trees_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/statuses/{sha}","languages_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/languages","stargazers_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/stargazers","contributors_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/contributors","subscribers_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/subscribers","subscription_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/subscription","commits_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/commits{/sha}","git_commits_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/git/commits{/sha}","comments_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/comments{/number}","issue_comment_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/issues/comments{/number}","contents_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/contents/{+path}","compare_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/merges","archive_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/downloads","issues_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/issues{/number}","pulls_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/pulls{/number}","milestones_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/milestones{/number}","notifications_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/labels{/name}","releases_url":"https://api.github.com/repos/KSP-CKAN/NetKAN/releases{/id}","created_at":"2014-11-05T00:14:13Z","updated_at":"2015-07-02T19:08:15Z","pushed_at":"2015-07-07T06:49:00Z","git_url":"git://github.com/KSP-CKAN/NetKAN.git","ssh_url":"git@github.com:KSP-CKAN/NetKAN.git","clone_url":"https://github.com/KSP-CKAN/NetKAN.git","svn_url":"https://github.com/KSP-CKAN/NetKAN","homepage":null,"size":13469,"stargazers_count":14,"watchers_count":14,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":138,"mirror_url":null,"open_issues_count":22,"forks":138,"open_issues":22,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KSP-CKAN/NetKAN/pulls/1423"},"html":{"href":"https://github.com/KSP-CKAN/NetKAN/pull/1423"},"issue":{"href":"https://api.github.com/repos/KSP-CKAN/NetKAN/issues/1423"},"comments":{"href":"https://api.github.com/repos/KSP-CKAN/NetKAN/issues/1423/comments"},"review_comments":{"href":"https://api.github.com/repos/KSP-CKAN/NetKAN/pulls/1423/comments"},"review_comment":{"href":"https://api.github.com/repos/KSP-CKAN/NetKAN/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KSP-CKAN/NetKAN/pulls/1423/commits"},"statuses":{"href":"https://api.github.com/repos/KSP-CKAN/NetKAN/statuses/d54ec234107b491270264d0c9b457768e4a56192"}}}}