-
Notifications
You must be signed in to change notification settings - Fork 273
/
Copy pathgithub-runner-ubi8-build.yaml
82 lines (82 loc) · 2.07 KB
/
github-runner-ubi8-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
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
apiVersion: template.openshift.io/v1
kind: Template
metadata:
name: "github-runner-ubi8"
objects:
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
name: "${APPLICATION_NAME}"
labels:
app: ${APPLICATION_NAME}
spec:
lookupPolicy:
local: false
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
name: "${APPLICATION_NAME}-base"
labels:
app: ${APPLICATION_NAME}
spec:
lookupPolicy:
local: false
tags:
- from:
kind: DockerImage
name: "${BASE_IMAGE_LOCATION}:${BASE_IMAGE_TAG}"
name: "${BASE_IMAGE_TAG}"
- apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: "${APPLICATION_NAME}"
labels:
app: ${APPLICATION_NAME}
spec:
output:
to:
kind: ImageStreamTag
name: "${APPLICATION_NAME}:latest"
source:
contextDir: "${CONTEXT_DIR}"
git:
uri: "${SOURCE_REPOSITORY_URL}"
ref: "${SOURCE_REPOSITORY_REF}"
type: Git
strategy:
dockerStrategy:
from:
kind: ImageStreamTag
name: ${APPLICATION_NAME}-base:${BASE_IMAGE_TAG}
type: Docker
triggers:
- type: ImageChange
- type: ConfigChange
parameters:
- description: The name for the application.
displayName: Application name
name: APPLICATION_NAME
required: true
value: github-runner-ubi8
- description: Path within Git repository to build; empty for root of repository
displayName: Git context directory
name: CONTEXT_DIR
value: "github-runner-ubi8"
- description: Git branch/tag reference
name: SOURCE_REPOSITORY_REF
value: master
required: true
- description: Git source URL for application
name: SOURCE_REPOSITORY_URL
required: true
value: https://github.com/redhat-cop/containers-quickstarts
- description: Location of the source base image.
displayName: Base Image
name: BASE_IMAGE_LOCATION
required: true
value: registry.access.redhat.com/ubi8/ubi
- description: Tag of the base image.
displayName: Base Image Tag
name: BASE_IMAGE_TAG
required: true
value: latest