-
Notifications
You must be signed in to change notification settings - Fork 0
/
openshift.jsonnet
70 lines (68 loc) · 1.34 KB
/
openshift.jsonnet
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
local appName = "renty";
local projectName = "renty";
local pythonVersion = "3.6";
[
{
kind: "ImageStream",
apiVersion: "v1",
metadata: {
name: appName,
annotations: {
description: "Keeps track of changes in the application image"
}
}
},
{
kind: "BuildConfig",
apiVersion: "v1",
metadata: {
name: appName,
annotations: {
description: "Defines how to build the application",
"template.alpha.openshift.io/wait-for-ready": "true"
}
},
spec: {
source: {
type: "Git",
git: {
uri: "https://github.com/wheelerlaw/renty.git",
// ref: "master"
}
},
strategy: {
type: "Source",
sourceStrategy: {
from: {
kind: "ImageStreamTag",
namespace: "openshift",
name: "python:" + pythonVersion,
},
}
},
output: {
to: {
kind: "ImageStreamTag",
name: appName + ":latest"
}
},
triggers: [
{
type: "ImageChange"
},
{
type: "ConfigChange"
},
{
type: "GitHub",
github: {
secret: "sosecret"
}
}
],
postCommit: {
script: "./manage.py test"
}
}
}
]