diff --git a/Dispatchfile b/Dispatchfile index 52424f4b..177dd490 100644 --- a/Dispatchfile +++ b/Dispatchfile @@ -1,26 +1,28 @@ -#!starlark +#!mesosphere/dispatch-starlark:v0.5 -gitResource("src-git", url = "$(context.git.url)", revision = "$(context.git.commit)") +load("github.com/mesosphere/dispatch-catalog/starlark/stable/pipeline@0.0.4", "gitResource", "pullRequest", "push", "secretVar", "clean", "imageResource", "volume", "storageResource") +load("github.com/mesosphere/cluster-claim-controller/starlark/claim", "make_kind_cluster", "fetch_kubeconfig", "cleanup") +load("github.com/mesosphere/dispatch-catalog/starlark/stable/docker@0.0.4", "dindTask") -def secretVar(name, key): - return k8s.corev1.EnvVarSource(secretKeyRef = k8s.corev1.SecretKeySelector( - localObjectReference = k8s.corev1.LocalObjectReference(name=name), - key = key)) + +gitResource("kba-git-resource", url = "$(context.git.url)", revision = "$(context.git.commit)") + + +cluster_name = "test-kind-cluster" +kind_cluster=make_kind_cluster(cluster_name, "kba-git-resource") dindTask("dispatch-integration-test", - inputs = ["src-git"], + inputs = ["kba-git-resource"], steps = [ v1.Container( name="fetch-master", - image = "mesosphere/dispatch-dind:v0.5.2", - workingDir="/workspace/src-git", + workingDir="/workspace/kba-git-resource", args=["git", "fetch", "origin", "master"]), - v1.Container( name = "dispatch-integration-test", image = "mesosphere/kubeaddons-ci:dispatch@sha256:80a6f3c8775133b4ad2fab3d44ab4fbb4b541dbc03fcdb296b13f67611427d8c", - command = ["make","dispatch-test"], - workingDir = "/workspace/src-git", + command = ["/entrypoint.sh","make","dispatch-test"], + workingDir = "/workspace/kba-git-resource", env = [k8s.corev1.EnvVar(name = "DISPATCH_CI", value = "true"), k8s.corev1.EnvVar(name = "AWS_REGION", value= "us-west-2"), k8s.corev1.EnvVar(name = "AWS_ACCESS_KEY_ID",