forked from toschneck/openshift-example-bakery-ci-pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.pipeline.yml
More file actions
79 lines (79 loc) · 1.75 KB
/
build.pipeline.yml
File metadata and controls
79 lines (79 loc) · 1.75 KB
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
apiVersion: v1
kind: Template
metadata:
creationTimestamp: null
name: ci-builds
parameters:
- name: APP_NAME
required: true
- name: STAGE
required: true
- name: GIT_URL
required: true
value: 'https://github.com/toschneck/openshift-example-bakery-ci-pipeline'
- name: GIT_BRANCH
required: true
value: 'master'
- name: GIT_PATH
required: false
value: ''
- name: GITHUB_WEBHOOK_SECRET
description: GitHub trigger secret
from: '[a-zA-Z0-9]{8}'
generate: expression
required: true
- name: GENERIC_WEBHOOK_SECRET
description: Generic build trigger secret
from: '[a-zA-Z0-9]{8}'
generate: expression
required: true
- name: NEXUS_HOST
description: "host of nexus repo"
required: true
objects:
- apiVersion: v1
kind: BuildConfig
metadata:
creationTimestamp: null
name: ${APP_NAME}
labels:
application: ${APP_NAME}
stage: ${STAGE}
spec:
nodeSelector: {}
output: {}
postCommit: {}
resources: {}
runPolicy: Serial
source:
git:
ref: ${GIT_BRANCH}
uri: ${GIT_URL}
contextDir: ${GIT_PATH}
type: Git
strategy:
type: JenkinsPipeline
jenkinsPipelineStrategy:
jenkinsfilePath: "jenkins/Jenkinsfile.${STAGE}"
env:
- name: "NEXUS_HOST"
value: "${NEXUS_HOST}"
- name: "GIT_BRANCH"
value: "${GIT_BRANCH}"
triggers:
- github:
secret: ${GITHUB_WEBHOOK_SECRET}
type: GitHub
- generic:
secret: ${GENERIC_WEBHOOK_SECRET}
type: Generic
status:
lastVersion: 0
- apiVersion: v1
kind: ImageStream
metadata:
creationTimestamp: null
labels:
application: ${APP_NAME}
stage: ${STAGE}
name: ${APP_NAME}