Created
February 8, 2017 00:54
-
-
Save sherl0cks/099daa7aef8c8e12aadd92b3fb51c7f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "kind": "Template", | |
| "apiVersion": "v1", | |
| "metadata": { | |
| "name": "jenkins-s2i", | |
| "annotations": { | |
| "openshift.io/display-name": "Jenkins S2I", | |
| "description": "Jenkins S2I build config to create a Jenkins image with your configuration baked in.", | |
| "iconClass": "icon-jenkins", | |
| "tags": "instant-app,jenkins" | |
| } | |
| }, | |
| "objects": [ | |
| { | |
| "kind": "BuildConfig", | |
| "apiVersion": "v1", | |
| "metadata": { | |
| "name": "${NAME}" | |
| }, | |
| "spec": { | |
| "triggers": [ | |
| { | |
| "type": "GitHub", | |
| "github": { | |
| "secret": "${GITHUB_WEBHOOK_SECRET}" | |
| } | |
| }, | |
| { | |
| "type": "ConfigChange" | |
| }, | |
| { | |
| "type": "ImageChange" | |
| } | |
| ], | |
| "runPolicy": "Serial", | |
| "source": { | |
| "type": "Git", | |
| "git": { | |
| "uri": "${SOURCE_REPOSITORY_URL}", | |
| "ref": "${SOURCE_REPOSITORY_REF}" | |
| } | |
| }, | |
| "strategy": { | |
| "type": "Source", | |
| "sourceStrategy": { | |
| "from": { | |
| "kind": "ImageStreamTag", | |
| "name": "jenkins-2-rhel7:latest" | |
| } | |
| } | |
| }, | |
| "output": { | |
| "to": { | |
| "kind": "ImageStreamTag", | |
| "name": "${NAME}:latest" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "kind": "ImageStream", | |
| "apiVersion": "v1", | |
| "metadata": { | |
| "name": "${NAME}", | |
| "annotations": { | |
| "description": "Keeps track of changes in the application image" | |
| } | |
| } | |
| }, | |
| { | |
| "kind": "ImageStream", | |
| "apiVersion": "v1", | |
| "metadata": { | |
| "name": "jenkins-2-rhel7" | |
| }, | |
| "spec": { | |
| "tags": [ | |
| { | |
| "name": "latest", | |
| "annotations": { | |
| "openshift.io/imported-from": "registry.access.redhat.com/openshift3/jenkins-2-rhel7" | |
| }, | |
| "from": { | |
| "kind": "DockerImage", | |
| "name": "registry.access.redhat.com/openshift3/jenkins-2-rhel7" | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "NAME", | |
| "displayName": "Name", | |
| "description": "The name assigned to all objects and the resulting imagestream.", | |
| "required": true, | |
| "value": "jenkins" | |
| }, | |
| { | |
| "name": "GITHUB_WEBHOOK_SECRET", | |
| "displayName": "GitHub Webhook Secret", | |
| "description": "A secret string used to configure the GitHub webhook.", | |
| "generate": "expression", | |
| "from": "[a-zA-Z0-9]{40}" | |
| }, | |
| { | |
| "name": "SOURCE_REPOSITORY_URL", | |
| "displayName": "Git Repository URL", | |
| "description": "The URL of the repository with your application source code.", | |
| "required": true, | |
| "value": "https://github.com/rht-labs/openshift-jenkins-s2i-config.git" | |
| }, | |
| { | |
| "name": "SOURCE_REPOSITORY_REF", | |
| "displayName": "Git Reference", | |
| "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default (master) branch." | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment