forked from redhat-aqe/review-rot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reviewrot-build-template.yaml
84 lines (82 loc) · 1.97 KB
/
reviewrot-build-template.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
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
kind: Template
apiVersion: v1
metadata:
name: code-review-reminder-build-template
annotations:
openshift.io/display-name: "Code review reminder build"
description: "Build template builds Centos7 Dockerfile, adds review-rot git repository,
install reviewrot and upload Docker Image to QUAY."
tags: "reviewrot code-review-reminder build"
message: |
Code review reminder has been initialized.
Please add a modified config file
.reviewrot.yaml into secrets.
objects:
- kind: ImageStream
apiVersion: v1
metadata:
annotations:
openshift.io/display-name: "reviewrot"
name: reviewrot
spec:
tags:
- name: latest
annotation: null
from:
kind: DockerImage
name: ${DOCKER_IMAGE}:${TAG}
importPolicy:
scheduled: true
- kind: BuildConfig
apiVersion: v1
metadata:
name: ${APP}-build
labels:
app: build
service: ${APP}
spec:
source:
type: Git
git:
uri: ${GIT_URL}
ref: ${REF}
# Maybe change the strategy to get image from docker-registry
strategy:
type: Docker
output:
pushSecret:
name: ${PUSH_SECRETS}
to:
kind: DockerImage
name: ${DOCKER_IMAGE}:${TAG}
runPolicy: Serial
triggers:
- type: ImageChange
imageChange: {}
- type: ConfigChange
# code-review-reminder
parameters:
- description: "APP name [lowercase]"
name: APP
required: true
value: "code-review-reminder"
- description: "Review rot Github url"
name: GIT_URL
required: true
value: "https://github.com/nirzari/review-rot.git"
- description: "Git branch"
name: REF
required: true
value: master
- description: "Docker image tag"
name: TAG
required: true
value: latest
- description: "Docker image url"
name: DOCKER_IMAGE
required: true
value: quay.io/pbortlov/reviewrot
- description: "Docker registry push secrets (QUAY BOT SECRETS)"
name: PUSH_SECRETS
required: true
value: pbortlov-reviewrot-bot-secret