-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.yaml
57 lines (57 loc) · 1.23 KB
/
build.yaml
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
apiVersion: template.openshift.io/v1
kind: Template
metadata:
name: exporter-build
objects:
- apiVersion: v1
kind: ImageStream
metadata:
name: application-exporter
namespace: ${APP_NAMESPACE}
- apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: application-exporter
namespace: ${APP_NAMESPACE}
spec:
output:
to:
kind: ImageStreamTag
name: application-exporter:latest
namespace: ${APP_NAMESPACE}
postCommit: {}
source:
git:
uri: ${GIT_REPO}
ref: ${GIT_REF}
type: Git
strategy:
type: Docker
dockerStrategy:
buildArgs:
- name: BUILD_VERSION
value: ${BUILD_VERSION}
triggers:
- type: ConfigChange
parameters:
- description: App namespace
from: '[A-Z0-9]{8}'
generate: expression
name: APP_NAMESPACE
- description: Git repo
from: '[A-Z0-9]{8}'
generate: expression
name: GIT_REPO
value: https://github.com/dmartinol/application-exporter.git
- description: Git ref
from: '[A-Z0-9]{8}'
generate: expression
name: GIT_REF
value: main
- description: Build version
from: '[A-Z0-9]{8}'
generate: expression
name: BUILD_VERSION
value: latest
labels:
app: application-exporter