Merge "Gate: Add linter gate and path options to OSH-Infra"

This commit is contained in:
Zuul 2017-11-13 19:05:39 +00:00 committed by Gerrit Code Review
commit c1f55190ac
5 changed files with 65 additions and 23 deletions

View File

@ -16,6 +16,8 @@
name: openstack/openstack-helm-infra
check:
jobs:
- openstack-helm-infra-linter:
voting: true
- openstack-helm-infra-ubuntu:
voting: true
- openstack-helm-infra-centos:
@ -24,8 +26,15 @@
voting: false
gate:
jobs:
- openstack-helm-infra-linter
- openstack-helm-infra-ubuntu
- nodeset:
name: openstack-helm-single-node
nodes:
- name: primary
label: ubuntu-xenial
- nodeset:
name: openstack-helm-ubuntu
nodes:
@ -79,6 +88,12 @@
nodes:
- node-1
- node-2
- job:
name: openstack-helm-infra-linter
run: tools/gate/playbooks/zuul-linter.yaml
nodeset: openstack-helm-single-node
- job:
name: openstack-helm-infra
pre-run: tools/gate/playbooks/zuul-pre.yaml

View File

@ -12,17 +12,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: build the Kubeadm-AIO image
docker_image:
path: "{{ work_dir }}/"
name: "{{ images.kubernetes.kubeadm_aio }}"
dockerfile: "tools/images/kubeadm-aio/Dockerfile"
force: yes
pull: yes
state: present
rm: yes
buildargs:
KUBE_VERSION: "{{ version.kubernetes }}"
CNI_VERSION: "{{ version.cni }}"
HELM_VERSION: "{{ version.helm }}"
CHARTS: "calico,flannel,tiller,kube-dns"
- name: Kubeadm-AIO build
block:
#NOTE(portdirect): we do this to ensure we are feeding the docker build
# a clean path to work with.
- name: Kubeadm-AIO image build path
shell: cd "{{ work_dir }}"; pwd
register: kubeadm_aio_path
- name: build the Kubeadm-AIO image
docker_image:
path: "{{ kubeadm_aio_path.stdout }}/"
name: "{{ images.kubernetes.kubeadm_aio }}"
dockerfile: "tools/images/kubeadm-aio/Dockerfile"
force: yes
pull: yes
state: present
rm: yes
buildargs:
KUBE_VERSION: "{{ version.kubernetes }}"
CNI_VERSION: "{{ version.cni }}"
HELM_VERSION: "{{ version.helm }}"
CHARTS: "calico,flannel,tiller,kube-dns"

View File

@ -0,0 +1,20 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- hosts: primary
tasks:
- name: Execute a Whitespace Linter check
command: find . -not -path "*/\.*" -not -path "*/doc/build/*" -not -name "*.tgz" -type f -exec egrep -l " +$" {} \;
register: result
failed_when: result.stdout != ""

View File

@ -16,7 +16,7 @@
vars_files:
- vars.yaml
vars:
work_dir: "{{ zuul.project.src_dir }}"
work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
gather_facts: False
become: yes
roles:
@ -28,7 +28,7 @@
vars_files:
- vars.yaml
vars:
work_dir: "{{ zuul.project.src_dir }}"
work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
gather_facts: True
roles:
- build-helm-packages
@ -39,7 +39,7 @@
vars_files:
- vars.yaml
vars:
work_dir: "{{ zuul.project.src_dir }}"
work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
gather_facts: True
become: yes
roles:
@ -57,7 +57,7 @@
vars_files:
- vars.yaml
vars:
work_dir: "{{ zuul.project.src_dir }}"
work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
gather_facts: False
become: yes
roles:
@ -69,7 +69,7 @@
vars_files:
- vars.yaml
vars:
work_dir: "{{ zuul.project.src_dir }}"
work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
gather_facts: True
roles:
- pull-images

View File

@ -16,7 +16,7 @@
vars_files:
- vars.yaml
vars:
work_dir: "{{ zuul.project.src_dir }}"
work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
roles:
- clean-host
tags:
@ -26,7 +26,7 @@
vars_files:
- vars.yaml
vars:
work_dir: "{{ zuul.project.src_dir }}"
work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
roles:
- deploy-kubeadm-aio-master
tags:
@ -36,7 +36,7 @@
vars_files:
- vars.yaml
vars:
work_dir: "{{ zuul.project.src_dir }}"
work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
roles:
- deploy-kubeadm-aio-node
tags:
@ -46,7 +46,7 @@
vars_files:
- vars.yaml
vars:
work_dir: "{{ zuul.project.src_dir }}"
work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
roles:
- deploy-helm-packages
tags: