Skip to content

Instantly share code, notes, and snippets.

@alvarolobato
Created March 17, 2016 12:53
Show Gist options
  • Save alvarolobato/bdbdddb14bf890712554 to your computer and use it in GitHub Desktop.
Save alvarolobato/bdbdddb14bf890712554 to your computer and use it in GitHub Desktop.
Jenkins CJP Openshift master template
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "jenkinse",
"creationTimestamp": null,
"annotations": {
"description": "Builds and deploys a WildFly J2EE Application",
"iconClass": "icon-jboss",
"tags": "instant-app,java,mysql, wildfly"
}
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "jenkins-enterprise",
"creationTimestamp": null,
"labels": {
"app": "jenkins-enterprise"
},
"annotations": {
"openshift.io/generated-by": "OpenShiftNewApp"
}
},
"spec": {
"ports": [
{
"name": "8080-tcp",
"protocol": "TCP",
"port": 8080,
"targetPort": 8080
},
{
"name": "50000-tcp",
"protocol": "TCP",
"port": 50000,
"targetPort": 50000
}
],
"selector": {
"app": "jenkins-enterprise",
"deploymentconfig": "jenkins-enterprise"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "route-edge",
"creationTimestamp": null
},
"spec": {
"host": "jenkinse.openshift.beesshop.org",
"to": {
"kind": "Service",
"name": "jenkins-enterprise"
},
"port": {
"targetPort": "8080-tcp"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "jenkins-enterprise",
"creationTimestamp": null,
"labels": {
"app": "jenkins-enterprise"
},
"annotations": {
"openshift.io/generated-by": "OpenShiftNewApp"
}
},
"spec": {
"tags": [
{
"name": "latest",
"annotations": {
"openshift.io/imported-from": "cloudbees/jenkins-enterprise"
},
"from": {
"kind": "DockerImage",
"name": "cloudbees/jenkins-enterprise"
},
"generation": null,
"importPolicy": {}
}
]
},
"status": {
"dockerImageRepository": ""
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "jenkins-enterprise",
"creationTimestamp": null,
"labels": {
"app": "jenkins-enterprise"
},
"annotations": {
"openshift.io/generated-by": "OpenShiftNewApp"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": [
{
"type": "ConfigChange"
},
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"jenkins-enterprise"
],
"from": {
"kind": "ImageStreamTag",
"name": "jenkins-enterprise:latest"
}
}
}
],
"replicas": 1,
"test": false,
"selector": {
"app": "jenkins-enterprise",
"deploymentconfig": "jenkins-enterprise"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"app": "jenkins-enterprise",
"deploymentconfig": "jenkins-enterprise"
},
"annotations": {
"openshift.io/generated-by": "OpenShiftNewApp"
}
},
"spec": {
"volumes": [
{
"name": "jenkins-enterprise-volume-1",
"persistentVolumeClaim":{
"claimName": "jenkinse-claim"
}
}
],
"containers": [
{
"name": "jenkins-enterprise",
"image": "cloudbees/jenkins-enterprise",
"ports": [
{
"containerPort": 8080,
"protocol": "TCP"
},
{
"containerPort": 50000,
"protocol": "TCP"
}
],
"resources": {},
"volumeMounts": [
{
"name": "jenkins-enterprise-volume-1",
"mountPath": "/var/jenkins_home"
}
]
}
]
}
}
},
"status": {}
},
{
"kind": "PersistentVolumeClaim",
"apiVersion": "v1",
"metadata": {
"name": "jenkinse-claim",
"creationTimestamp": null
},
"spec": {
"accessModes": [
"ReadWriteOnce"
],
"resources": {
"requests": {
"storage": "1Gi"
}
}
},
"status": {}
}
],
"parameters": [],
"labels": {
"template": "jenkins-enterprise"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment