{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/jenkins/pulls/comments/42499243","id":42499243,"diff_hunk":"@@ -0,0 +1,102 @@\n+# Jenkins Master example\n+\n+This directory contains an example of Jenkins setup, that is configured to\n+demonstrate the CI/pipeline workflow for the sample-app application using the\n+Jenkins Master/Slave setup and automatization done on OpenShift v3.\n+\n+<p align=\"center\">\n+<img width=\"420\" src=\"https://raw.githubusercontent.com/mfojtik/jenkins-ci/master/jenkins-flow.png\"/>\n+</p>\n+\n+## Installation\n+\n+To start, you have to manually enter following commands in OpenShift:\n+\n+\n+```console\n+# Create project and allow Jenkins to talk to OpenShift API\n+$ oc new-project ci\n+$ oc policy add-role-to-user edit system:serviceaccount:ci:default\n+\n+# Create the 'staging' project where we deploy the sample-app for testing\n+$ oc new-project stage\n+$ oc policy add-role-to-user edit system:serviceaccount:stage:default\n+$ oc policy add-role-to-user edit system:serviceaccount:ci:default\n+\n+# Now create the templates in the 'ci' and 'stage' projects\n+$ oc create -f openshift -n ci\n+$ oc create -f https://raw.githubusercontent.com/openshift/jenkins/master/examples/master/jenkins-master-with-k8s-plugin.json\n+$ oc create -f https://raw.githubusercontent.com/openshift/jenkins/master/examples/slave/s2i-slave-template.json\n+```\n+\n+## Instantiating templates from OpenShift web console\n+\n+Navigate to the OpenShift UI and choose the `ci` project we created in previous\n+step. Now click on *Add to Project* button and then click on *Show All\n+Template*. You should see *jenkins-master* template and *s2i-to-jenkins-slave*.\n+\n+Note: To continue, you have to first create your Jenkins Slave image. Please see\n+the [instructions](../slave/README.md) here.\n+\n+### Jenkins Master\n+\n+This template defines a\n+[BuildConfig](https://docs.openshift.org/latest/dev_guide/builds.html#defining-a-buildconfig)\n+that again, use the [Docker\n+Strategy](https://docs.openshift.org/latest/dev_guide/builds.html#docker-strategy-options)\n+to rebuild the official [OpenShift Jenkins Image](https://github.com/openshift/jenkins).\n+This template also defines a [Deployment Configuration](https://docs.openshift.org/latest/dev_guide/deployments.html#creating-a-deployment-configuration) that will start just one instance\n+of the Jenkins server.\n+\n+When you choose the `jenkins-master` template, you have to specify these parameters:\n+\n+* **JENKINS_SERVICE_NAME** - The name of the Jenkins service (default: *jenkins*)\n+* **JENKINS_IMAGE** - The name of the original Jenkins image to use\n+* **JENKINS_PASSWORD** - The Jenkins 'admin' user password","path":"examples/master/README.md","position":54,"original_position":55,"commit_id":"d5ef72a3135cd369c9d4ed76c25b0d96edadfcc5","original_commit_id":"6c6a6f4bc0cfc0583c2dc356d034dc86c2ae7469","user":{"login":"bparees","id":4974046,"avatar_url":"https://avatars.githubusercontent.com/u/4974046?v=3","gravatar_id":"","url":"https://api.github.com/users/bparees","html_url":"https://github.com/bparees","followers_url":"https://api.github.com/users/bparees/followers","following_url":"https://api.github.com/users/bparees/following{/other_user}","gists_url":"https://api.github.com/users/bparees/gists{/gist_id}","starred_url":"https://api.github.com/users/bparees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bparees/subscriptions","organizations_url":"https://api.github.com/users/bparees/orgs","repos_url":"https://api.github.com/users/bparees/repos","events_url":"https://api.github.com/users/bparees/events{/privacy}","received_events_url":"https://api.github.com/users/bparees/received_events","type":"User","site_admin":false},"body":"sure, as long as it has a sane default.\r\n","created_at":"2015-10-20T14:07:16Z","updated_at":"2015-10-20T14:07:16Z","html_url":"https://github.com/openshift/jenkins/pull/36#discussion_r42499243","pull_request_url":"https://api.github.com/repos/openshift/jenkins/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/openshift/jenkins/pulls/comments/42499243"},"html":{"href":"https://github.com/openshift/jenkins/pull/36#discussion_r42499243"},"pull_request":{"href":"https://api.github.com/repos/openshift/jenkins/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/jenkins/pulls/36","id":47149975,"html_url":"https://github.com/openshift/jenkins/pull/36","diff_url":"https://github.com/openshift/jenkins/pull/36.diff","patch_url":"https://github.com/openshift/jenkins/pull/36.patch","issue_url":"https://api.github.com/repos/openshift/jenkins/issues/36","number":36,"state":"open","locked":false,"title":"Make the Jenkins image S2I compatible to install plugins and configuration","user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.githubusercontent.com/u/44136?v=3","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"body":"See: https://gist.github.com/mfojtik/ff4ed568cfea5b8974d2\r\n\r\nThis will allow:\r\n\r\n* Installing plugin binaries using `plugins/` directory in repository\r\n* Installing plugins using `plugins.sh plugins.txt` (downloading from Jenkins update center)\r\n* Installing custom Jenkins job definitions\r\n* Installing additional files/configuration\r\n\r\nThis should work both on CentOS and RHEL7 image. The main reason for this is that we can't include the plugins in RHEL7 image as we can't download them from internet. This will allow users to rebuild the image and add the plugins from the repository (if they want to).\r\nThe image will still work out-of-box (just without plugins, kubernetes slave support and other things).","created_at":"2015-10-08T13:08:28Z","updated_at":"2015-10-20T14:07:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0a7c8341e222c1398feb5d62f972accf81c99d6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/jenkins/pulls/36/commits","review_comments_url":"https://api.github.com/repos/openshift/jenkins/pulls/36/comments","review_comment_url":"https://api.github.com/repos/openshift/jenkins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/jenkins/issues/36/comments","statuses_url":"https://api.github.com/repos/openshift/jenkins/statuses/d5ef72a3135cd369c9d4ed76c25b0d96edadfcc5","head":{"label":"mfojtik:sti","ref":"sti","sha":"d5ef72a3135cd369c9d4ed76c25b0d96edadfcc5","user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.githubusercontent.com/u/44136?v=3","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"repo":{"id":40120163,"name":"jenkins","full_name":"mfojtik/jenkins","owner":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.githubusercontent.com/u/44136?v=3","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mfojtik/jenkins","description":"","fork":true,"url":"https://api.github.com/repos/mfojtik/jenkins","forks_url":"https://api.github.com/repos/mfojtik/jenkins/forks","keys_url":"https://api.github.com/repos/mfojtik/jenkins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mfojtik/jenkins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mfojtik/jenkins/teams","hooks_url":"https://api.github.com/repos/mfojtik/jenkins/hooks","issue_events_url":"https://api.github.com/repos/mfojtik/jenkins/issues/events{/number}","events_url":"https://api.github.com/repos/mfojtik/jenkins/events","assignees_url":"https://api.github.com/repos/mfojtik/jenkins/assignees{/user}","branches_url":"https://api.github.com/repos/mfojtik/jenkins/branches{/branch}","tags_url":"https://api.github.com/repos/mfojtik/jenkins/tags","blobs_url":"https://api.github.com/repos/mfojtik/jenkins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mfojtik/jenkins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mfojtik/jenkins/git/refs{/sha}","trees_url":"https://api.github.com/repos/mfojtik/jenkins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mfojtik/jenkins/statuses/{sha}","languages_url":"https://api.github.com/repos/mfojtik/jenkins/languages","stargazers_url":"https://api.github.com/repos/mfojtik/jenkins/stargazers","contributors_url":"https://api.github.com/repos/mfojtik/jenkins/contributors","subscribers_url":"https://api.github.com/repos/mfojtik/jenkins/subscribers","subscription_url":"https://api.github.com/repos/mfojtik/jenkins/subscription","commits_url":"https://api.github.com/repos/mfojtik/jenkins/commits{/sha}","git_commits_url":"https://api.github.com/repos/mfojtik/jenkins/git/commits{/sha}","comments_url":"https://api.github.com/repos/mfojtik/jenkins/comments{/number}","issue_comment_url":"https://api.github.com/repos/mfojtik/jenkins/issues/comments{/number}","contents_url":"https://api.github.com/repos/mfojtik/jenkins/contents/{+path}","compare_url":"https://api.github.com/repos/mfojtik/jenkins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mfojtik/jenkins/merges","archive_url":"https://api.github.com/repos/mfojtik/jenkins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mfojtik/jenkins/downloads","issues_url":"https://api.github.com/repos/mfojtik/jenkins/issues{/number}","pulls_url":"https://api.github.com/repos/mfojtik/jenkins/pulls{/number}","milestones_url":"https://api.github.com/repos/mfojtik/jenkins/milestones{/number}","notifications_url":"https://api.github.com/repos/mfojtik/jenkins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mfojtik/jenkins/labels{/name}","releases_url":"https://api.github.com/repos/mfojtik/jenkins/releases{/id}","created_at":"2015-08-03T11:00:28Z","updated_at":"2015-08-03T11:00:28Z","pushed_at":"2015-10-20T12:03:31Z","git_url":"git://github.com/mfojtik/jenkins.git","ssh_url":"git@github.com:mfojtik/jenkins.git","clone_url":"https://github.com/mfojtik/jenkins.git","svn_url":"https://github.com/mfojtik/jenkins","homepage":null,"size":4345,"stargazers_count":0,"watchers_count":0,"language":"Shell","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":"openshift:master","ref":"master","sha":"0e79c39cae63651290d94bf4ea2060e076da4da4","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":27453817,"name":"jenkins","full_name":"openshift/jenkins","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/jenkins","description":"","fork":false,"url":"https://api.github.com/repos/openshift/jenkins","forks_url":"https://api.github.com/repos/openshift/jenkins/forks","keys_url":"https://api.github.com/repos/openshift/jenkins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/jenkins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/jenkins/teams","hooks_url":"https://api.github.com/repos/openshift/jenkins/hooks","issue_events_url":"https://api.github.com/repos/openshift/jenkins/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/jenkins/events","assignees_url":"https://api.github.com/repos/openshift/jenkins/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/jenkins/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/jenkins/tags","blobs_url":"https://api.github.com/repos/openshift/jenkins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/jenkins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/jenkins/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/jenkins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/jenkins/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/jenkins/languages","stargazers_url":"https://api.github.com/repos/openshift/jenkins/stargazers","contributors_url":"https://api.github.com/repos/openshift/jenkins/contributors","subscribers_url":"https://api.github.com/repos/openshift/jenkins/subscribers","subscription_url":"https://api.github.com/repos/openshift/jenkins/subscription","commits_url":"https://api.github.com/repos/openshift/jenkins/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/jenkins/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/jenkins/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/jenkins/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/jenkins/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/jenkins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/jenkins/merges","archive_url":"https://api.github.com/repos/openshift/jenkins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/jenkins/downloads","issues_url":"https://api.github.com/repos/openshift/jenkins/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/jenkins/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/jenkins/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/jenkins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/jenkins/labels{/name}","releases_url":"https://api.github.com/repos/openshift/jenkins/releases{/id}","created_at":"2014-12-02T21:15:10Z","updated_at":"2015-09-23T17:06:38Z","pushed_at":"2015-10-20T12:03:32Z","git_url":"git://github.com/openshift/jenkins.git","ssh_url":"git@github.com:openshift/jenkins.git","clone_url":"https://github.com/openshift/jenkins.git","svn_url":"https://github.com/openshift/jenkins","homepage":null,"size":4785,"stargazers_count":2,"watchers_count":2,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":5,"forks":11,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/jenkins/pulls/36"},"html":{"href":"https://github.com/openshift/jenkins/pull/36"},"issue":{"href":"https://api.github.com/repos/openshift/jenkins/issues/36"},"comments":{"href":"https://api.github.com/repos/openshift/jenkins/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/jenkins/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/jenkins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/jenkins/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/jenkins/statuses/d5ef72a3135cd369c9d4ed76c25b0d96edadfcc5"}}}}