From b5944c23ba7af98e887874cbe5f5ae6b250098fc Mon Sep 17 00:00:00 2001 From: Joe Julian Date: Tue, 25 Feb 2020 16:30:43 -0800 Subject: [PATCH] Revert "Add Dispatchfile (#430)" This reverts commit 576d61b4e90115dda8bd6eb179bda325a38e79e0. --- Dispatchfile | 71 ------------------------------------------- test/e2e-kind.sh | 13 +------- test/kind-config.yaml | 19 ------------ 3 files changed, 1 insertion(+), 102 deletions(-) delete mode 100644 Dispatchfile diff --git a/Dispatchfile b/Dispatchfile deleted file mode 100644 index d0880e2c7..000000000 --- a/Dispatchfile +++ /dev/null @@ -1,71 +0,0 @@ -#!starlark -# vi:syntax=python -# - -git = "src-git" - -def secretVar(name, key): - return k8s.corev1.EnvVarSource(secretKeyRef=k8s.corev1.SecretKeySelector(localObjectReference=k8s.corev1.LocalObjectReference(name=name), key=key)) - -gitResource(git, - url="$(context.git.url)", - revision="$(context.git.commit)") - -dindTask("publish", inputs=[git], steps=[ - v1.Container( - name = "publish-charts", - workingDir = "/workspace/src-git", - args = [ - "/bin/bash", "-c", - """ - apt-get update - apt-get install -qq git build-essential - git fetch origin master --unshallow - export GIT_REMOTE_URL=https://mesosphere:${GITHUB_USER_TOKEN}@github.com/mesosphere/charts.git - make publish - """ - ], - env=[k8s.corev1.EnvVar(name="GITHUB_USER_TOKEN", valueFrom=secretVar("scmtoken", "password"))] - ) -]) - -dindTask("lint", inputs=[git], steps=[ - v1.Container( - name = "lint-charts", - workingDir = "/workspace/src-git", - args = [ - "/bin/bash", "-c", - """ - apt-get update - apt-get install -qq git build-essential - git fetch origin master --unshallow - make lint - """ - ] - ) -]) - -dindTask("test", inputs=[git], deps=["lint"], steps=[ - v1.Container( - name = "test-charts", - workingDir = "/workspace/src-git", - args = [ - "/bin/bash", "-c", - """ - apt-get update - apt-get install -qq git build-essential - git fetch origin master --unshallow - make test - """ - ], - resources = k8s.corev1.ResourceRequirements( - limits = { - "cpu": k8s.resource_quantity("1000m"), - "memory": k8s.resource_quantity("6Gi") - } - ) - ) -]) - -action(tasks=["test"], on=pullRequest(branches=["*"])) -action(tasks=["publish"], on=push(branches=["master"])) diff --git a/test/e2e-kind.sh b/test/e2e-kind.sh index ab4c6b399..6e6ba7a36 100755 --- a/test/e2e-kind.sh +++ b/test/e2e-kind.sh @@ -3,7 +3,6 @@ set -o errexit set -o nounset set -o pipefail -set -x readonly KIND_VERSION=v0.6.1 readonly CLUSTER_NAME=chart-testing @@ -46,18 +45,8 @@ create_kind_cluster() { "https://github.com/kubernetes-sigs/kind/releases/download/$KIND_VERSION/kind-$(uname)-amd64" chmod +x "${tmp}/kind" - curl -sSLo "${tmp}/entrypoint.sh" "https://raw.githubusercontent.com/mesosphere/dispatch/f74d477930e8cf05b84eb8a0f98c3866b66e1125/docker/kind/entrypoint.sh?token=ACIQJHWXERD34NEOUHGOWIS6KWQO6" - chmod +x "${tmp}/entrypoint.sh" - - cat << EOF > tmp_dockerfile -FROM kindest/node:$K8S_VERSION -ADD ./entrypoint.sh /usr/local/bin/entrypoint -EOF - - docker build -t tmp-dispatch-kind:latest -f tmp_dockerfile "${tmp}" - "${tmp}/kind" create cluster --name "$CLUSTER_NAME" \ - --config test/kind-config.yaml --image "tmp-dispatch-kind:latest" \ + --config test/kind-config.yaml --image "kindest/node:$K8S_VERSION" \ --wait 60s docker_exec mkdir -p /root/.kube diff --git a/test/kind-config.yaml b/test/kind-config.yaml index 8dd75af59..cebee6d5b 100644 --- a/test/kind-config.yaml +++ b/test/kind-config.yaml @@ -3,22 +3,3 @@ apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - role: worker -# These kubeadm config patches are required for running Kind inside a docker container. -# We started running Kind in a kubernetes pod as part of the CI transition to Dispatch. -kubeadmConfigPatches: -- | - apiVersion: kubeadm.k8s.io/v1beta2 - kind: JoinConfiguration - metadata: - name: config - nodeRegistration: - kubeletExtraArgs: - cgroup-root: "/kubelet" -- | - apiVersion: kubeadm.k8s.io/v1beta2 - kind: InitConfiguration - metadata: - name: config - nodeRegistration: - kubeletExtraArgs: - cgroup-root: "/kubelet"