forked from redhat-cop/containers-quickstarts
-
Notifications
You must be signed in to change notification settings - Fork 4
/
jenkins-slave-generic-template.yml
84 lines (84 loc) · 2.4 KB
/
jenkins-slave-generic-template.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
---
kind: Template
apiVersion: v1
metadata:
name: "${NAME}"
annotations:
openshift.io/display-name: Generic Build Pod
description: "${NAME} build pod template pre-configured to use a jenkins slave in the
same project/namespace"
objects:
- apiVersion: v1
kind: ImageStream
metadata:
labels:
build: "${NAME}"
role: jenkins-slave
name: "${NAME}"
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
build: "${NAME}"
type: image
name: "${NAME}"
spec:
nodeSelector:
output:
to:
kind: ImageStreamTag
name: "${NAME}:${SLAVE_IMAGE_TAG}"
postCommit: {}
resources: {}
runPolicy: Serial
source:
contextDir: "${SOURCE_CONTEXT_DIR}"
git:
ref: "${SOURCE_REPOSITORY_REF}"
uri: "${SOURCE_REPOSITORY_URL}"
type: Git
strategy:
dockerStrategy:
dockerfilePath: "${DOCKERFILE_PATH}"
from:
kind: DockerImage
name: "${BUILDER_IMAGE_NAME}"
imagePullPolicy: Always
type: Docker
triggers:
- type: ConfigChange
- type: ImageChange
parameters:
- name: NAME
displayName: Name
description: The name assigned to all objects and the resulting imagestream.
required: true
- name: SOURCE_REPOSITORY_URL
displayName: Git Repository URL
description: The URL of the repository with your application source code.
required: true
value: https://github.com/redhat-cop/containers-quickstarts
- name: SOURCE_REPOSITORY_REF
displayName: Git Reference
description: Set this to a branch name, tag or other ref of your repository if you
are not using the default (master) branch.
value: master
- name: SOURCE_CONTEXT_DIR
displayName: Git Context Directory
description: Set this to the directory where the build information is (e.g. Dockerfile)
if not using the default
- name: BUILDER_IMAGE_NAME
displayName: Image name from which to build this pod
description: The build image which this build pod will extend to create it's new
build pod type.
value: registry.access.redhat.com/openshift3/jenkins-slave-base-rhel7
- name: SLAVE_IMAGE_TAG
displayName: Image tag for Jenkins slave.
description: This is the image tag used for the Jenkins slave.
value: latest
- name: DOCKERFILE_PATH
displayName: Path to Dockerfile
description: Path for alternate Dockerfile to use for build
value: Dockerfile
labels:
template: build-pod-template