diff --git a/contrib/test/integration/build/kubernetes.yml b/contrib/test/integration/build/kubernetes.yml index 84f6fb4f4e8..9b17b7d85e4 100644 --- a/contrib/test/integration/build/kubernetes.yml +++ b/contrib/test/integration/build/kubernetes.yml @@ -71,3 +71,9 @@ KUBECONFIG=/var/run/kubernetes/admin.kubeconfig regexp: 'KUBECONFIG=' state: present + +- name: install kubectl (for kubetest) + copy: + src: "{{ ansible_env.GOPATH }}/src/k8s.io/kubernetes/_output/bin/kubectl" + dest: "{{ ansible_env.GOPATH }}/bin/kubectl" + mode: "preserve" diff --git a/contrib/test/integration/build/kubetest.yml b/contrib/test/integration/build/kubetest.yml new file mode 100644 index 00000000000..93607afa666 --- /dev/null +++ b/contrib/test/integration/build/kubetest.yml @@ -0,0 +1,16 @@ +--- + +- name: clone test-infra source repo + git: + repo: "https://github.com/kubernetes/test-infra.git" + dest: "{{ ansible_env.GOPATH }}/src/k8s.io/test-infra" + force: "{{ force_clone | default(False) | bool}}" + +# per https://github.com/kubernetes/test-infra/issues/14070 we need to download +# kubetest with go module 1.11 on and without -u. As of the time of writing this, +# neither are happening in hack/e2e.go. instead, add this, and set --get=false when +# running e2e +- name: install kubetest + shell: GOPROXY=https://proxy.golang.org GOSUMDB=sum.golang.org GO111MODULE=on go get ./kubetest + args: + chdir: "{{ ansible_env.GOPATH }}/src/k8s.io/test-infra" diff --git a/contrib/test/integration/e2e-features.yml b/contrib/test/integration/e2e-features.yml index 414e38ddda2..39ea8472759 100644 --- a/contrib/test/integration/e2e-features.yml +++ b/contrib/test/integration/e2e-features.yml @@ -9,7 +9,9 @@ - name: Buffer the e2e testing command to workaround Ansible YAML folding "feature" set_fact: e2e_shell_cmd: > - KUBE_CONTAINER_RUNTIME="remote" GINKGO_PARALLEL_NODES=6 GINKGO_PARALLEL=y /usr/bin/go run hack/e2e.go + KUBE_CONTAINER_RUNTIME="remote" GINKGO_PARALLEL_NODES=6 GINKGO_PARALLEL=y + "{{ ansible_env.GOPATH }}"/bin/kubetest + --provider local --test --test_args="-host=https://{{ ansible_default_ipv4.address }}:6443 --ginkgo.focus=\[Feature:SecurityContext\] diff --git a/contrib/test/integration/e2e.yml b/contrib/test/integration/e2e.yml index 0244179877f..d6377dbe7c7 100644 --- a/contrib/test/integration/e2e.yml +++ b/contrib/test/integration/e2e.yml @@ -11,7 +11,9 @@ - name: Buffer the e2e testing command to workaround Ansible YAML folding "feature" set_fact: e2e_shell_cmd: > - KUBE_CONTAINER_RUNTIME="remote" GINKGO_TOLERATE_FLAKES="y" GINKGO_PARALLEL_NODES=6 GINKGO_PARALLEL=y /usr/bin/go run hack/e2e.go + KUBE_CONTAINER_RUNTIME="remote" GINKGO_TOLERATE_FLAKES="y" GINKGO_PARALLEL_NODES=6 GINKGO_PARALLEL=y + "{{ ansible_env.GOPATH }}"/bin/kubetest + --provider local --test --test_args="-host=https://{{ ansible_default_ipv4.address }}:6443 --ginkgo.skip=\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|PersistentVolumes|\[HPA\]|should.support.building.a.client.with.a.CSR|should.propagate.mounts.to.the.host|for.NodePort.service|type.clusterIP|unready.pods|ExternalName.services|Guestbook.application|in-cluster.config|Pods.should.support.pod.readiness.gates|\[sig-storage\].In-tree.Volumes.\[Driver:.local\]|\[sig-storage\].CSI.Volumes.CSI.Topology.test.using.GCE.PD.driver diff --git a/contrib/test/integration/golang.yml b/contrib/test/integration/golang.yml index fec27dfa255..d573417634c 100644 --- a/contrib/test/integration/golang.yml +++ b/contrib/test/integration/golang.yml @@ -46,6 +46,7 @@ - "{{ ansible_env.GOPATH }}/src/github.com/k8s.io" - "{{ ansible_env.GOPATH }}/src/github.com/bats-core" - "{{ ansible_env.GOPATH }}/src/github.com/opencontainers" + - "{{ ansible_env.GOPATH }}/src/k8s.io/test-infra" - name: install Go tools and dependencies shell: /usr/bin/go get -u "github.com/{{ item }}" diff --git a/contrib/test/integration/main.yml b/contrib/test/integration/main.yml index d3aef5864aa..8e7f9a5454e 100644 --- a/contrib/test/integration/main.yml +++ b/contrib/test/integration/main.yml @@ -29,6 +29,9 @@ k8s_github_fork: "kubernetes" crio_socket: "/var/run/crio/crio.sock" + - name: clone build and install kubetest + include: "build/kubetest.yml" + - name: clone build and install runc include: "build/runc.yml" when: "{{ build_runc | default(True) | bool}}" @@ -121,6 +124,10 @@ k8s_git_version: "release-1.15" k8s_github_fork: "kubernetes" crio_socket: "/var/run/crio/crio.sock" + + - name: clone build and install kubetest + include: "build/kubetest.yml" + - name: run k8s e2e tests include: e2e.yml @@ -138,5 +145,9 @@ k8s_git_version: "master" k8s_github_fork: "kubernetes" crio_socket: "/var/run/crio/crio.sock" + + - name: clone build and install kubetest + include: "build/kubetest.yml" + - name: run k8s e2e features tests include: e2e-features.yml