QA CI: Add Ubuntu 16.04 QA CI

Add the relevant pipeline, jobs, roles, playbooks etc.
to enable a Kata QA CI build/run on Ubuntu 16.04 triggered
by the relevant github state changes.

Change-Id: Id4174c68856bbb792c002b05e36e36bfe19dbca9
Signed-off-by: Graham Whaley <graham.whaley@intel.com>
This commit is contained in:
Graham Whaley 2019-03-05 15:55:33 +00:00
parent ea08333d05
commit 7000de896a
6 changed files with 174 additions and 1 deletions

View File

@ -0,0 +1,85 @@
---
- hosts: all
tasks:
- name: Ensure logs directory
file:
path: '{{ ansible_user_dir }}/logs'
state: directory
mode: 0755
# TODO use with items
- name: Write runtime log
shell: |
set -x
journalctl -b -o short-precise -t kata-runtime | gzip > {{ ansible_user_dir }}/logs/kata-runtime.log.gz
become: yes
- name: Make runtime log readable
file:
path: '{{ ansible_user_dir }}/logs/kata-runtime.log.gz'
mode: 'u+r,g+r,o+r'
become: yes
- name: Write agent and proxy log
shell: |
set -x
journalctl -b -o short-precise -t kata-proxy | gzip > {{ ansible_user_dir }}/logs/kata-proxy.log.gz
become: yes
- name: Make proxy log readable
file:
path: '{{ ansible_user_dir }}/logs/kata-proxy.log.gz'
mode: 'u+r,g+r,o+r'
become: yes
- name: Write shim log
shell: |
set -x
journalctl -b -o short-precise -t kata-shim | gzip > {{ ansible_user_dir }}/logs/kata-shim.log.gz
become: yes
- name: Make shim log readable
file:
path: '{{ ansible_user_dir }}/logs/kata-shim.log.gz'
mode: 'u+r,g+r,o+r'
become: yes
- name: Write docker log
shell: |
set -x
journalctl -b -o short-precise -u docker.service | gzip > {{ ansible_user_dir }}/logs/docker.log.gz
become: yes
- name: Make docker log readable
file:
path: '{{ ansible_user_dir }}/logs/docker.log.gz'
mode: 'u+r,g+r,o+r'
become: yes
- name: Write crio log
shell: |
set -x
journalctl -b -o short-precise -u crio | gzip > {{ ansible_user_dir }}/logs/crio.log.gz
become: yes
- name: Make crio log readable
file:
path: '{{ ansible_user_dir }}/logs/crio.log.gz'
mode: 'u+r,g+r,o+r'
become: yes
- name: Write kubelet log
shell: |
set -x
journalctl -b -o short-precise -u kubelet | gzip > {{ ansible_user_dir }}/logs/kubelet.log.gz
become: yes
- name: Make kubelet log readable
file:
path: '{{ ansible_user_dir }}/logs/kubelet.log.gz'
mode: 'u+r,g+r,o+r'
become: yes
- name: Copy log files from test node to executor
synchronize:
src: '{{ ansible_user_dir }}/logs'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --prune-empty-dirs

View File

@ -0,0 +1,18 @@
---
- hosts: all
tasks:
- name: Run Kata CI setup
args:
executable: /bin/bash
chdir: "{{ zuul.project.src_dir }}"
shell: |
set -x
# set a ${WORKSPACE}, so we look enough like a Jenkins env that
# the Kata ci script will execute
export WORKSPACE=$HOME
export GOPATH=$HOME/go
export CI=true
export ZUUL=true
export PATH=${GOPATH}/bin:/usr/sbin:$PATH
.ci/install_go.sh -p -f
.ci/setup.sh

View File

@ -0,0 +1,14 @@
---
- hosts: all
tasks:
- name: Run kata QA CI
args:
executable: /bin/bash
chdir: "{{ zuul.project.src_dir }}"
shell: |
set -x
export CI=true
export ZUUL=true
export GOPATH=$HOME/go
export PATH=${GOPATH}/bin:/usr/sbin:$PATH
.ci/run.sh

View File

@ -20,7 +20,7 @@
- job:
name: kata-github-wip
description: |
This job calls the github-pr playbook with a Kata-curated set of
This job calls the github-wip playbook with a Kata-curated set of
WIP labels and WIP title keywords
run: playbooks/github-wip/run.yaml
nodeset:
@ -28,3 +28,16 @@
vars:
wip_labels: 'do-not-merge wip rfc'
wip_keywords: 'WIP RFC'
- job:
name: QA-check-Ubuntu-16.04
description: |
This job calls the QA-check playbook
pre-run: playbooks/CI-setup/presetup.yaml
run: playbooks/QA-check/run.yaml
post-run: playbooks/CI-setup/postrun.yaml
nodeset:
# Ensure we get a Kata capable Ubuntu 16.04 server
nodes:
- name: ubuntu-xenial
label: ubuntu-xenial-vexxhost

View File

@ -150,3 +150,43 @@
# Don't report merge-failures to github
merge-failure:
mysql:
- pipeline:
name: PR-check
description: |
New and modified GitHub PRs enter this pipeline to be tested.
success-message: PR checks OK.
failure-message: PR checks failed.
manager: independent
precedence: low
trigger:
github:
- event: pull_request
action:
- opened
- changed
- reopened
- event: pull_request
action: comment
comment: (?i)^\s*/zuul-recheck\s*$
start:
github:
status: pending
comment: false
success:
github:
status: 'success'
comment: false
status-url: |
https://github.com/kata-containers/community/wiki/Zuul-PR-checks
mysql:
failure:
github:
status: 'failure'
comment: false
status-url: |
https://github.com/kata-containers/community/wiki/Zuul-PR-checks
mysql:
# Don't report merge-failures to github
merge-failure:
mysql:

View File

@ -55,6 +55,9 @@
name: kata-containers/proxy
templates:
- kata-pre-checks
PR-check:
jobs:
- QA-check-Ubuntu-16.04
- project:
name: kata-containers/runtime