{"action":"created","comment":{"url":"https://api.github.com/repos/ONSdigital/business-index-api/pulls/comments/204798659","pull_request_review_id":139942846,"id":204798659,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDc5ODY1OQ==","diff_hunk":"@@ -29,225 +23,154 @@ pipeline {\n     }\n     agent any\n     stages {\n-        stage('Checkout'){\n+        stage('Checkout') {\n             agent any\n-            steps{\n+            environment{ STAGE = \"Checkout\" }\n+            steps {\n                 deleteDir()\n                 checkout scm\n                 stash name: 'app'\n-                sh \"$SBT version\"\n+                sh \"sbt version\"\n                 script {\n                     version = '1.0.' + env.BUILD_NUMBER\n                     currentBuild.displayName = version\n-                    env.NODE_STAGE = \"Checkout\"\n                 }\n             }\n         }\n \n-        stage('Build'){\n+        stage('Build') {\n             agent any\n-            steps {\n-                colourText(\"info\", \"Building ${env.BUILD_ID} on ${env.JENKINS_URL} from branch ${env.BRANCH_NAME}\")\n-                script {\n-                    env.NODE_STAGE = \"Build\"\n-                    sh '''\n-                        $SBT clean compile universal:packageBin coverage test coverageReport\n-                    '''\n-                    stash name: 'compiled'\n-                    if (BRANCH_NAME == BRANCH_DEV) {\n-                        env.DEPLOY_NAME = DEPLOY_DEV\n-                        sh \"cp target/universal/${ORGANIZATION}-${MODULE_NAME}-*.zip ${DEPLOY_DEV}-${ORGANIZATION}-${MODULE_NAME}.zip\"\n-                    }\n-                    else if  (BRANCH_NAME == BRANCH_TEST) {\n-                        env.DEPLOY_NAME = DEPLOY_TEST\n-                        sh \"cp target/universal/${ORGANIZATION}-${MODULE_NAME}-*.zip ${DEPLOY_TEST}-${ORGANIZATION}-${MODULE_NAME}.zip\"\n-                    }\n-                    else if (BRANCH_NAME == BRANCH_PROD) {\n-                        env.DEPLOY_NAME = DEPLOY_PROD\n-                        sh \"cp target/universal/${ORGANIZATION}-${MODULE_NAME}-*.zip ${DEPLOY_PROD}-${ORGANIZATION}-${MODULE_NAME}.zip\"\n-                    }\n-                    else {\n-                        colourText(\"info\", \"Not a deployable Git banch!\")\n-                    }\n+            environment{ STAGE = \"Build\" }\n+            steps{\n+                sh \"sbt clean compile\"\n+            }\n+            post {\n+                success {\n+                    colourText(\"info\",\"Stage: ${env.STAGE} successful!\")\n+                }\n+                failure {\n+                    colourText(\"warn\",\"Stage: ${env.STAGE} failed!\")\n                 }\n             }\n         }\n \n-        stage('Static Analysis') {\n+        stage('Test'){\n             agent any\n+            environment{ STAGE = \"Test\"  }\n             steps {\n-                parallel (\n-                        \"Unit\" :  {\n-                            colourText(\"info\",\"Running unit tests\")\n-                            sh \"$SBT test\"\n-                        },\n-                        \"Style\" : {\n-                            colourText(\"info\",\"Running style tests\")\n-                            sh \"\"\"\n-                                $SBT scalastyleGenerateConfig\n-                                $SBT scalastyle\n-                            \"\"\"\n-                        },\n-                        \"Additional\" : {\n-                            colourText(\"info\",\"Running additional tests\")\n-                            sh \"$SBT scapegoat\"\n-                        }\n-                )\n+                colourText(\"info\", \"Building ${env.BUILD_ID} on ${env.JENKINS_URL} from branch ${env.BRANCH_NAME}\")\n+                sh 'sbt coverage test coverageReport'\n             }\n             post {\n-                always {\n-                    script {\n-                        env.NODE_STAGE = \"Static Analysis\"\n-                    }\n-                }\n                 success {\n-                    colourText(\"info\",\"Generating reports for tests\")\n-                    //   junit '**/target/test-reports/*.xml'\n-\n-                    step([$class: 'CoberturaPublisher', coberturaReportFile: '**/target/scala-2.11/coverage-report/*.xml'])\n-                    step([$class: 'CheckStylePublisher', pattern: 'target/scalastyle-result.xml, target/scala-2.11/scapegoat-report/scapegoat-scalastyle.xml'])\n+                    junit '**/target/test-reports/*.xml'\n+                    step([$class: 'CoberturaPublisher', coberturaReportFile: '**/target/*/coverage-report/cobertura.xml'])\n+                    colourText(\"info\",\"Stage: ${env.STAGE} successful!\")\n                 }\n                 failure {\n-                    colourText(\"warn\",\"Failed on Tests.\")\n+                    colourText(\"warn\",\"Stage: ${env.STAGE} failed!\")\n                 }\n             }\n         }\n \n-\n-        // bundle all libs and dependencies\n-        stage ('Bundle') {\n+        stage('Static Analysis') {\n             agent any\n-            when {\n-                anyOf {\n-                    branch BRANCH_DEV\n-                    branch BRANCH_TEST\n-                    branch BRANCH_PROD\n-                }\n-            }\n+            environment{ STAGE = \"Static Analysis\" }\n             steps {\n-                script {\n-                    env.NODE_STAGE = \"Bundle\"\n+                parallel (","path":"Jenkinsfile","position":158,"original_position":158,"commit_id":"cfc7efef08e83c52650089199f84d91f91042d5c","original_commit_id":"cfc7efef08e83c52650089199f84d91f91042d5c","user":{"login":"awharris","id":24940095,"node_id":"MDQ6VXNlcjI0OTQwMDk1","avatar_url":"https://avatars3.githubusercontent.com/u/24940095?v=4","gravatar_id":"","url":"https://api.github.com/users/awharris","html_url":"https://github.com/awharris","followers_url":"https://api.github.com/users/awharris/followers","following_url":"https://api.github.com/users/awharris/following{/other_user}","gists_url":"https://api.github.com/users/awharris/gists{/gist_id}","starred_url":"https://api.github.com/users/awharris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awharris/subscriptions","organizations_url":"https://api.github.com/users/awharris/orgs","repos_url":"https://api.github.com/users/awharris/repos","events_url":"https://api.github.com/users/awharris/events{/privacy}","received_events_url":"https://api.github.com/users/awharris/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2018-07-24T15:18:08Z","updated_at":"2018-07-24T15:18:08Z","html_url":"https://github.com/ONSdigital/business-index-api/pull/69#discussion_r204798659","pull_request_url":"https://api.github.com/repos/ONSdigital/business-index-api/pulls/69","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/business-index-api/pulls/comments/204798659"},"html":{"href":"https://github.com/ONSdigital/business-index-api/pull/69#discussion_r204798659"},"pull_request":{"href":"https://api.github.com/repos/ONSdigital/business-index-api/pulls/69"}},"in_reply_to_id":204442386},"pull_request":{"url":"https://api.github.com/repos/ONSdigital/business-index-api/pulls/69","id":202569821,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyNTY5ODIx","html_url":"https://github.com/ONSdigital/business-index-api/pull/69","diff_url":"https://github.com/ONSdigital/business-index-api/pull/69.diff","patch_url":"https://github.com/ONSdigital/business-index-api/pull/69.patch","issue_url":"https://api.github.com/repos/ONSdigital/business-index-api/issues/69","number":69,"state":"open","locked":false,"title":"Updated Jenkinsfile for master branch release strategy","user":{"login":"awharris","id":24940095,"node_id":"MDQ6VXNlcjI0OTQwMDk1","avatar_url":"https://avatars3.githubusercontent.com/u/24940095?v=4","gravatar_id":"","url":"https://api.github.com/users/awharris","html_url":"https://github.com/awharris","followers_url":"https://api.github.com/users/awharris/followers","following_url":"https://api.github.com/users/awharris/following{/other_user}","gists_url":"https://api.github.com/users/awharris/gists{/gist_id}","starred_url":"https://api.github.com/users/awharris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awharris/subscriptions","organizations_url":"https://api.github.com/users/awharris/orgs","repos_url":"https://api.github.com/users/awharris/repos","events_url":"https://api.github.com/users/awharris/events{/privacy}","received_events_url":"https://api.github.com/users/awharris/received_events","type":"User","site_admin":false},"body":"- Refactored to use only master branch\r\n- Currently only deploys into dev environment","created_at":"2018-07-19T14:01:32Z","updated_at":"2018-07-24T15:18:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2270ed9c0a94ff2571eda9078b8822e7708d9c1d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ONSdigital/business-index-api/pulls/69/commits","review_comments_url":"https://api.github.com/repos/ONSdigital/business-index-api/pulls/69/comments","review_comment_url":"https://api.github.com/repos/ONSdigital/business-index-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ONSdigital/business-index-api/issues/69/comments","statuses_url":"https://api.github.com/repos/ONSdigital/business-index-api/statuses/cfc7efef08e83c52650089199f84d91f91042d5c","head":{"label":"ONSdigital:feature/REG-1417","ref":"feature/REG-1417","sha":"cfc7efef08e83c52650089199f84d91f91042d5c","user":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"repo":{"id":71132802,"node_id":"MDEwOlJlcG9zaXRvcnk3MTEzMjgwMg==","name":"business-index-api","full_name":"ONSdigital/business-index-api","owner":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ONSdigital/business-index-api","description":"ONS Business Index API","fork":false,"url":"https://api.github.com/repos/ONSdigital/business-index-api","forks_url":"https://api.github.com/repos/ONSdigital/business-index-api/forks","keys_url":"https://api.github.com/repos/ONSdigital/business-index-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/business-index-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/business-index-api/teams","hooks_url":"https://api.github.com/repos/ONSdigital/business-index-api/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/business-index-api/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/business-index-api/events","assignees_url":"https://api.github.com/repos/ONSdigital/business-index-api/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/business-index-api/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/business-index-api/tags","blobs_url":"https://api.github.com/repos/ONSdigital/business-index-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/business-index-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/business-index-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/business-index-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/business-index-api/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/business-index-api/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/business-index-api/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/business-index-api/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/business-index-api/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/business-index-api/subscription","commits_url":"https://api.github.com/repos/ONSdigital/business-index-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/business-index-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/business-index-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/business-index-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/business-index-api/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/business-index-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/business-index-api/merges","archive_url":"https://api.github.com/repos/ONSdigital/business-index-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/business-index-api/downloads","issues_url":"https://api.github.com/repos/ONSdigital/business-index-api/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/business-index-api/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/business-index-api/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/business-index-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/business-index-api/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/business-index-api/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/business-index-api/deployments","created_at":"2016-10-17T11:50:09Z","updated_at":"2018-06-29T08:20:52Z","pushed_at":"2018-07-24T15:13:00Z","git_url":"git://github.com/ONSdigital/business-index-api.git","ssh_url":"git@github.com:ONSdigital/business-index-api.git","clone_url":"https://github.com/ONSdigital/business-index-api.git","svn_url":"https://github.com/ONSdigital/business-index-api","homepage":"","size":19636,"stargazers_count":1,"watchers_count":1,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"ONSdigital:master","ref":"master","sha":"93d9af9fa4800222ba226b4224fa2db55ab3104b","user":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"repo":{"id":71132802,"node_id":"MDEwOlJlcG9zaXRvcnk3MTEzMjgwMg==","name":"business-index-api","full_name":"ONSdigital/business-index-api","owner":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ONSdigital/business-index-api","description":"ONS Business Index API","fork":false,"url":"https://api.github.com/repos/ONSdigital/business-index-api","forks_url":"https://api.github.com/repos/ONSdigital/business-index-api/forks","keys_url":"https://api.github.com/repos/ONSdigital/business-index-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/business-index-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/business-index-api/teams","hooks_url":"https://api.github.com/repos/ONSdigital/business-index-api/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/business-index-api/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/business-index-api/events","assignees_url":"https://api.github.com/repos/ONSdigital/business-index-api/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/business-index-api/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/business-index-api/tags","blobs_url":"https://api.github.com/repos/ONSdigital/business-index-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/business-index-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/business-index-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/business-index-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/business-index-api/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/business-index-api/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/business-index-api/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/business-index-api/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/business-index-api/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/business-index-api/subscription","commits_url":"https://api.github.com/repos/ONSdigital/business-index-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/business-index-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/business-index-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/business-index-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/business-index-api/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/business-index-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/business-index-api/merges","archive_url":"https://api.github.com/repos/ONSdigital/business-index-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/business-index-api/downloads","issues_url":"https://api.github.com/repos/ONSdigital/business-index-api/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/business-index-api/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/business-index-api/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/business-index-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/business-index-api/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/business-index-api/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/business-index-api/deployments","created_at":"2016-10-17T11:50:09Z","updated_at":"2018-06-29T08:20:52Z","pushed_at":"2018-07-24T15:13:00Z","git_url":"git://github.com/ONSdigital/business-index-api.git","ssh_url":"git@github.com:ONSdigital/business-index-api.git","clone_url":"https://github.com/ONSdigital/business-index-api.git","svn_url":"https://github.com/ONSdigital/business-index-api","homepage":"","size":19636,"stargazers_count":1,"watchers_count":1,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/business-index-api/pulls/69"},"html":{"href":"https://github.com/ONSdigital/business-index-api/pull/69"},"issue":{"href":"https://api.github.com/repos/ONSdigital/business-index-api/issues/69"},"comments":{"href":"https://api.github.com/repos/ONSdigital/business-index-api/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/ONSdigital/business-index-api/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/ONSdigital/business-index-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ONSdigital/business-index-api/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/ONSdigital/business-index-api/statuses/cfc7efef08e83c52650089199f84d91f91042d5c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"awharris"}}