From e0b7d2eeedc3adf8d0f20f2fa54f16bf8876a51d Mon Sep 17 00:00:00 2001 From: DanG100 Date: Fri, 28 Oct 2022 21:19:43 +0000 Subject: [PATCH] wip experimental --- cloudbuild/presubmit.sh | 15 +++++++++------ cloudbuild/presubmit.yaml | 14 ++++---------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/cloudbuild/presubmit.sh b/cloudbuild/presubmit.sh index b513c89b..74a8a785 100755 --- a/cloudbuild/presubmit.sh +++ b/cloudbuild/presubmit.sh @@ -1,13 +1,16 @@ #!/bin/bash -set -xe +set -eE -export PATH=${PATH}:/usr/local/go/bin -gopath=$(go env GOPATH) -export PATH=${PATH}:$gopath/bin +printf "\n apiServerPort: 6443" >> /kne-internal/kind/kind-no-cni.yaml +sed -i "s/name: kne/name: kne\n recycle: true/g" /kne-internal/deploy/kne/kind-bridge.yaml -cd /tmp/workspace -kne deploy ~/kne-internal/deploy/kne/kind-bridge.yaml +kind create cluster --name kne +mkdir -p ~/.kube +kind get kubeconfig --internal --name kne > ~/.kube/config +docker network connect kind "$(cat /etc/hostname)" + +kne deploy /kne-internal/deploy/kne/kind-bridge.yaml --kubecfg ~/kubeconfig make deploy itest make clean make deploy2 itest2 \ No newline at end of file diff --git a/cloudbuild/presubmit.yaml b/cloudbuild/presubmit.yaml index 2e7a82e9..c7d842ce 100644 --- a/cloudbuild/presubmit.yaml +++ b/cloudbuild/presubmit.yaml @@ -1,14 +1,8 @@ steps: - - id: remote_builder_test - name: gcr.io/$PROJECT_ID/remote-builder - env: - - USERNAME=user - - SSH_ARGS=--internal-ip --ssh-key-expire-after=1d - - INSTANCE_NAME=kne-presubmit-$BUILD_ID - - INSTANCE_ARGS=--network cloudbuild-workers --image-project gep-kne --image-family kne --machine-type n2-standard-16 --preemptible - - ZONE=us-central1-a - - REMOTE_WORKSPACE=/tmp/workspace - - COMMAND=source /tmp/workspace/cloudbuild/presubmit.sh 2>&1 + - id: local_test + name: gcr.io/$PROJECT_ID/kne-kind + entrypoint: 'bash' + args: ['cloudbuild/presubmit.sh'] timeout: 1800s