forked from d2iq-archive/kubernetes-base-addons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dispatchfile
29 lines (25 loc) · 1.32 KB
/
Dispatchfile
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
#!starlark
gitResource("src-git", url = "$(context.git.url)", revision = "$(context.git.commit)")
def secretVar(name, key):
return k8s.corev1.EnvVarSource(secretKeyRef = k8s.corev1.SecretKeySelector(
localObjectReference = k8s.corev1.LocalObjectReference(name=name),
key = key))
dindTask("dispatch-integration-test",
inputs = ["src-git"],
steps = [
v1.Container(
name="fetch-master",
image = "mesosphere/dispatch-dind:v0.5.2",
workingDir="/workspace/src-git",
args=["git", "fetch", "origin", "master"]),
v1.Container(
name = "dispatch-integration-test",
image = "mesosphere/kubeaddons-ci:dispatch",
command = ["make","test"],
workingDir = "/workspace/src-git",
env = [k8s.corev1.EnvVar(name = "DISPATCH_CI", value = "true"),
k8s.corev1.EnvVar(name = "SSH_KEY_BASE64",
valueFrom = secretVar("d2iq-dispatch-git-ssh-base64",
"ssh-privatekey-base64"))])])
action(tasks = ["dispatch-integration-test"], on = pullRequest())
action(tasks = ["dispatch-integration-test"], on = pullRequest(chatops = ["test"]))