-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbc_jenkins_slave_template.yaml
69 lines (69 loc) · 1.84 KB
/
bc_jenkins_slave_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
kind: Template
apiVersion: v1
metadata:
name: "jenkins-slave-template"
annotations:
description: "The slave image for jenkins."
iconClass: "icon-jenkins"
tags: "jenkins,slave,dotnet,gradle"
objects:
- kind: "BuildConfig"
apiVersion: "v1"
metadata:
name: ${IMAGE_NAME}
spec:
env:
- name: "GIT_SSL_NO_VERIFY"
value: ${GIT_SSL_NO_VERIFY}
source:
type: "Git"
git:
ref: ${GIT_BRANCH}
uri: ${GIT_URL}
contextDir: ${GIT_CONTEXT_DIR}
strategy:
type: "Docker"
dockerStrategy:
dockerfilePath: ${DOCKERFILE_PATH}
env:
- name: GIT_SSL_NO_VERIFY
value: ${GIT_SSL_NO_VERIFY}
output:
to:
kind: "ImageStreamTag"
name: "${IMAGE_NAME}:${IMAGE_STREAM_TAG}"
- kind: "ImageStream"
apiVersion: "v1"
metadata:
name: ${IMAGE_NAME}
labels:
role: jenkins-slave
annotations:
role: jenkins-slave
parameters:
- name: "GIT_URL"
description: "The URL of the repository with slave dockerfile."
value: "https://github.com/osa-ora/sample_dotnet"
required: true
- name: "GIT_BRANCH"
description: "The branch within the repository which contains the applicable source code"
value: "main"
required: true
- name: "GIT_CONTEXT_DIR"
description: "The sub directory location of the docker file"
value: "docker"
- name: "DOCKERFILE_PATH"
description: "The path to the dockerfile to use when building the image e.g. dockerfile_dotnet or dockerfile_gradle."
required: true
value: "dockerfile_dotnet_node"
- name: "IMAGE_NAME"
description: "The name of the image this build will produce"
value: "jenkins-slave-dotnet"
required: true
- name: "IMAGE_STREAM_TAG"
description: "The tag to associate with the image"
value: "latest"
required: true
- name: "GIT_SSL_NO_VERIFY"
value: "true"
required: true