forked from redhat-cop/container-pipelines
-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.yml
111 lines (111 loc) · 3.11 KB
/
template.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
apiVersion: v1
kind: Template
labels:
template: generic-java-jenkins-pipeline
metadata:
annotations:
description: Application template for JWS applications built using a Jenkins Pipeline
iconClass: icon-tomcat
tags: tomcat,tomcat8,java,jboss,xpaas,jenkins-ci
version: 1.2.0
name: generic-java-jenkins-pipeline
objects:
- kind: "BuildConfig"
apiVersion: "v1"
metadata:
labels:
application: ${APPLICATION_NAME}
name: "${APPLICATION_NAME}-pipeline"
namespace: "${NAMESPACE}"
spec:
source:
type: Git
git:
uri: ${SOURCE_REPOSITORY_URL}
ref: ${SOURCE_REPOSITORY_REF}
contextDir: ${CONTEXT_DIR}
triggers:
- type: "GitHub"
github:
secret: ${GITHUB_WEBHOOK_SECRET}
- type: "ConfigChange"
strategy:
type: "JenkinsPipeline"
jenkinsPipelineStrategy:
jenkinsfilePath: ${PIPELINE_SCRIPT}
env:
- name: "BUILD_CONTEXT_DIR"
value: "demo"
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
namespace: "${NAMESPACE}"
spec:
failedBuildHistoryLimit: 3
output:
to:
kind: ImageStreamTag
name: ${APPLICATION_NAME}:latest
source:
binary: {}
type: Binary
strategy:
sourceStrategy:
from:
kind: ImageStreamTag
name: ${IMAGE_STREAM_TAG_NAME}
namespace: ${IMAGE_STREAM_NAMESPACE}
type: Source
successfulBuildHistoryLimit: 3
- apiVersion: v1
kind: ImageStream
metadata:
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
namespace: ${NAMESPACE}
parameters:
- description: The name for the application.
name: APPLICATION_NAME
required: true
value: basic-tomcat
- description: The namespace to deploy into
name: NAMESPACE
required: true
- description: Git source URI for application
name: SOURCE_REPOSITORY_URL
required: true
value: https://github.com/etsauer/ticket-monster.git
- description: Git branch/tag reference
name: SOURCE_REPOSITORY_REF
value: "master"
- description: Path within Git project to build; empty for root project directory.
name: CONTEXT_DIR
value:
- description: Path within Git project pointing to the pipeline run script
name: PIPELINE_SCRIPT
value: pipeline.groovy
- description: GitHub trigger secret
from: '[a-zA-Z0-9]{8}'
generate: expression
name: GITHUB_WEBHOOK_SECRET
required: true
- description: Generic build trigger secret
from: '[a-zA-Z0-9]{8}'
generate: expression
name: GENERIC_WEBHOOK_SECRET
required: true
- description: Namespace in which the ImageStreams for Red Hat Middleware images are
installed. These ImageStreams are normally installed in the openshift namespace.
You should only need to modify this if you've installed the ImageStreams in a
different namespace/project.
name: IMAGE_STREAM_NAMESPACE
required: true
value: openshift
- description: Image stream tag for the image you'd like to use to build the application
name: IMAGE_STREAM_TAG_NAME
required: true
value: jboss-webserver31-tomcat8-openshift:1.0