Merge pull request #1167 from runcom/wire-critest

CI: wire in critest
This commit is contained in:
Mrunal Patel 2017-11-21 06:16:19 -10:00 committed by GitHub
commit 73c1a9823f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 73 additions and 4 deletions

View file

@ -5,12 +5,23 @@
repo: "https://github.com/kubernetes-incubator/cri-tools.git" repo: "https://github.com/kubernetes-incubator/cri-tools.git"
dest: "{{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator/cri-tools" dest: "{{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator/cri-tools"
version: "b42fc3f364dd48f649d55926c34492beeb9b2e99" version: "b42fc3f364dd48f649d55926c34492beeb9b2e99"
version: "{{ cri_tools_git_version }}"
force: "{{ force_clone | default(False) | bool}}"
- name: install crictl - name: install crictl
command: "/usr/bin/go install github.com/kubernetes-incubator/cri-tools/cmd/crictl" command: "/usr/bin/go install github.com/kubernetes-incubator/cri-tools/cmd/crictl"
- name: install critest
command: "/usr/bin/go install github.com/kubernetes-incubator/cri-tools/cmd/critest"
- name: link crictl - name: link crictl
file: file:
src: "{{ ansible_env.GOPATH }}/bin/crictl" src: "{{ ansible_env.GOPATH }}/bin/crictl"
dest: /usr/bin/crictl dest: /usr/bin/crictl
state: link state: link
- name: link critest
file:
src: "{{ ansible_env.GOPATH }}/bin/critest"
dest: /usr/bin/critest
state: link

View file

@ -0,0 +1,48 @@
---
- name: enable and start CRI-O
systemd:
name: crio
state: started
enabled: yes
daemon_reload: yes
- name: Flush the iptables
command: iptables -F
- name: Enable localnet routing
command: sysctl -w net.ipv4.conf.all.route_localnet=1
- name: Add masquerade for localhost
command: iptables -t nat -I POSTROUTING -s 127.0.0.1 ! -d 127.0.0.1 -j MASQUERADE
# TODO(runcom): enable skipped tests once we fix them (image list related)
# https://github.com/kubernetes-incubator/cri-o/issues/1048
- name: run critest validation
shell: "critest -c --runtime-endpoint /var/run/crio/crio.sock --image-endpoint /var/run/crio/crio.sock -s 'listImage should get exactly 2 repoTags in the result image' v"
args:
chdir: "{{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator/cri-o"
async: 5400
poll: 30
when: ansible_distribution not in ['RedHat', 'CentOS']
# XXX: RHEL has an additional test which fails beacuse of selinux but disabling
# it doesn't solve the issue.
# TODO(runcom): enable skipped tests once we fix them (image list related and selinux)
# https://github.com/kubernetes-incubator/cri-o/issues/1048
# https://bugzilla.redhat.com/show_bug.cgi?id=1414236
# https://access.redhat.com/solutions/2897781
- name: run critest validation
shell: "critest -c --runtime-endpoint /var/run/crio/crio.sock --image-endpoint /var/run/crio/crio.sock -s 'listImage should get exactly 2 repoTags in the result image|should not allow privilege escalation when true' v"
args:
chdir: "{{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator/cri-o"
async: 5400
poll: 30
when: ansible_distribution in ['RedHat', 'CentOS']
- name: run critest benchmarks
shell: "critest -c --runtime-endpoint /var/run/crio/crio.sock --image-endpoint /var/run/crio/crio.sock b"
args:
chdir: "{{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator/cri-o"
async: 5400
poll: 30

View file

@ -18,6 +18,8 @@
- name: clone build and install cri-tools - name: clone build and install cri-tools
include: "build/cri-tools.yml" include: "build/cri-tools.yml"
vars:
cri_tools_git_version: "b42fc3f364dd48f649d55926c34492beeb9b2e99"
- name: clone build and install kubernetes - name: clone build and install kubernetes
include: "build/kubernetes.yml" include: "build/kubernetes.yml"
@ -48,6 +50,11 @@
tags: tags:
- integration - integration
tasks: tasks:
- name: clone build and install cri-tools
include: "build/cri-tools.yml"
vars:
force_clone: True
cri_tools_git_version: "d9476a4d8632da6c28bf272018a0b9e059c3542f"
- name: run cri-o integration tests - name: run cri-o integration tests
include: test.yml include: test.yml
@ -62,11 +69,17 @@
include: golang.yml include: golang.yml
vars: vars:
version: "1.9.2" version: "1.9.2"
- name: setup critest
include: "build/cri-tools.yml"
vars:
force_clone: True
cri_tools_git_version: "d9476a4d8632da6c28bf272018a0b9e059c3542f"
- name: run critest validation and benchmarks
include: critest.yml
- name: clone build and install kubernetes - name: clone build and install kubernetes
include: "build/kubernetes.yml" include: "build/kubernetes.yml"
vars: vars:
force_clone: True force_clone: True
k8s_git_version: "cri-o-patched-1.9" k8s_git_version: "cri-o-patched-1.9"
- name: run k8s e2e tests - name: run k8s e2e tests
include: e2e.yml include: e2e.yml

View file

@ -1,8 +1,5 @@
--- ---
- name: clone build and install cri-tools
include: "build/cri-tools.yml"
- name: Make testing output verbose so it can be converted to xunit - name: Make testing output verbose so it can be converted to xunit
lineinfile: lineinfile:
dest: "{{ ansible_env.GOPATH }}/src/k8s.io/kubernetes/hack/make-rules/test.sh" dest: "{{ ansible_env.GOPATH }}/src/k8s.io/kubernetes/hack/make-rules/test.sh"