forked from redhat-cop/uncontained.io
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.yml
93 lines (93 loc) · 2.16 KB
/
build.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
apiVersion: v1
kind: Template
metadata:
name: pipeline-template
labels:
template-type: build
objects:
- apiVersion: v1
kind: ImageStream
metadata:
name: ${APP_NAME}
- apiVersion: v1
kind: BuildConfig
metadata:
creationTimestamp: null
labels:
build: ${APP_NAME}
name: ${APP_NAME}
spec:
failedBuildsHistoryLimit: 5
nodeSelector: null
output:
to:
kind: ${OUTPUT_IMAGE_TYPE}
name: ${OUTPUT_IMAGE}
postCommit: {}
resources: {}
runPolicy: Serial
source:
binary: {}
type: Binary
strategy:
sourceStrategy:
from:
kind: ImageStreamTag
name: nginx:latest
namespace: openshift
type: Source
successfulBuildsHistoryLimit: 5
triggers:
- type: ConfigChange
- type: ImageChange
imageChange: {}
status:
lastVersion: 0
- kind: "BuildConfig"
apiVersion: "v1"
metadata:
name: ${APP_NAME}-pipeline
spec:
source:
git:
uri: ${APPLICATION_SOURCE_REPO}
ref: ${APPLICATION_SOURCE_REF}
strategy:
jenkinsPipelineStrategy:
jenkinsfilePath: Jenkinsfile
env:
- name: APP_NAME
value: ${APP_NAME}
- name: APPLICATION_SOURCE_REPO
value: ${APPLICATION_SOURCE_REPO}
- name: APPLICATION_SOURCE_REF
value: ${APPLICATION_SOURCE_REF}
- name: CI_CD_NAMESPACE
value: ${CI_CD_NAMESPACE}
- name: DEV_NAMESPACE
value: ${DEV_NAMESPACE}
- name: TEST_NAMESPACE
value: ${TEST_NAMESPACE}
- name: STAGE_NAMESPACE
value: ${STAGE_NAMESPACE}
- name: PROD_NAMESPACE
value: ${PROD_NAMESPACE}
triggers:
- type: ConfigChange
- type: GitHub
github:
secret: d8g73hc87
parameters:
- name: APP_NAME
- name: OUTPUT_IMAGE
- name: OUTPUT_IMAGE_TYPE
- name: PUSH_SECRET
- name: APPLICATION_SOURCE_REPO
value: https://github.com/redhat-cop/uncontained.io
- name: APPLICATION_SOURCE_REF
value: master
- name: CI_CD_NAMESPACE
- name: DEV_NAMESPACE
- name: TEST_NAMESPACE
- name: STAGE_NAMESPACE
- name: PROD_NAMESPACE