summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Birley <pete@port.direct>2018-05-17 12:31:53 -0500
committerPete Birley <pete@port.direct>2018-05-17 12:37:14 -0500
commit00927b2383ae5be8a77ff12c73e858e50921c905 (patch)
treef1b3d5527f94ebaa806f508d6e2c9477aaed5b04
parentfcd97ef51c77e867b61426e1ba765fb8633b6297 (diff)
Zuul: Initial Airship-Divingbell checks
This PS adds the skeleton for a set of zuul checks and gates for Airship, using the framework from OpenStack-Helm. Change-Id: I757aef16f023248ab37e87d47e36fc1eae1e23c4 Signed-off-by: Pete Birley <pete@port.direct>
Notes
Notes (review): Code-Review+2: Scott Hussey <sthussey@att.com> Workflow+1: Scott Hussey <sthussey@att.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 17 May 2018 19:47:06 +0000 Reviewed-on: https://review.openstack.org/569183 Project: openstack/airship-divingbell Branch: refs/heads/master
-rw-r--r--.zuul.yaml58
-rw-r--r--tools/gate/playbooks/airship-divingbell-check.yaml22
-rw-r--r--tools/gate/playbooks/osh-infra-build.yaml36
-rw-r--r--tools/gate/playbooks/osh-infra-collect-logs.yaml30
-rw-r--r--tools/gate/playbooks/osh-infra-deploy-docker.yaml43
-rw-r--r--tools/gate/playbooks/osh-infra-deploy-k8s.yaml36
-rw-r--r--tools/gate/playbooks/osh-infra-upgrade-host.yaml41
-rw-r--r--tools/gate/playbooks/vars.yaml15
-rw-r--r--tools/gate/playbooks/zuul-linter.yaml20
-rwxr-xr-xtools/gate/scripts/010-build-charts.sh19
10 files changed, 320 insertions, 0 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
new file mode 100644
index 0000000..956158d
--- /dev/null
+++ b/.zuul.yaml
@@ -0,0 +1,58 @@
1# Licensed under the Apache License, Version 2.0 (the "License");
2# you may not use this file except in compliance with the License.
3# You may obtain a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS,
9# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10# See the License for the specific language governing permissions and
11# limitations under the License.
12
13- project:
14 check:
15 jobs:
16 - airship-divingbell-linter
17 - airship-divingbell-ubuntu:
18 voting: false
19 irrelevant-files:
20 - ^.*\.rst$
21 - ^doc/.*$
22 - ^releasenotes/.*$
23 gate:
24 jobs:
25 - airship-divingbell-linter
26 # NOTE(portdirect): enable when voting enabled.
27 # - airship-divingbell-ubuntu:
28 # irrelevant-files:
29 # - ^.*\.rst$
30 # - ^doc/.*$
31 # - ^releasenotes/.*$
32
33- job:
34 name: airship-divingbell-linter
35 run: tools/gate/playbooks/zuul-linter.yaml
36 nodeset: openstack-helm-single-node
37
38- job:
39 name: airship-divingbell
40 roles:
41 - zuul: openstack/openstack-helm-infra
42 vars:
43 zuul_osh_infra_relative_path: ../openstack-helm-infra/
44 timeout: 7200
45 pre-run:
46 - tools/gate/playbooks/osh-infra-upgrade-host.yaml
47 - tools/gate/playbooks/osh-infra-deploy-docker.yaml
48 - tools/gate/playbooks/osh-infra-build.yaml
49 - tools/gate/playbooks/osh-infra-deploy-k8s.yaml
50 run: tools/gate/playbooks/airship-divingbell-check.yaml
51 post-run: tools/gate/playbooks/osh-infra-collect-logs.yaml
52 required-projects:
53 - openstack/openstack-helm-infra
54
55- job:
56 name: airship-divingbell-ubuntu
57 parent: airship-divingbell
58 nodeset: openstack-helm-single-node
diff --git a/tools/gate/playbooks/airship-divingbell-check.yaml b/tools/gate/playbooks/airship-divingbell-check.yaml
new file mode 100644
index 0000000..89cbd90
--- /dev/null
+++ b/tools/gate/playbooks/airship-divingbell-check.yaml
@@ -0,0 +1,22 @@
1# Copyright 2017 The Openstack-Helm Authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15- hosts: primary
16 tasks:
17 - name: Build Charts
18 shell: |
19 set -xe;
20 ./tools/gate/scripts/010-build-charts.sh
21 args:
22 chdir: "{{ zuul_osh_relative_path | default(zuul.project.src_dir) }}"
diff --git a/tools/gate/playbooks/osh-infra-build.yaml b/tools/gate/playbooks/osh-infra-build.yaml
new file mode 100644
index 0000000..d06296c
--- /dev/null
+++ b/tools/gate/playbooks/osh-infra-build.yaml
@@ -0,0 +1,36 @@
1# Copyright 2017 The Openstack-Helm Authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15- hosts: primary
16 vars_files:
17 - vars.yaml
18 vars:
19 work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
20 gather_facts: True
21 roles:
22 - build-helm-packages
23 tags:
24 - build-helm-packages
25
26- hosts: all
27 vars_files:
28 - vars.yaml
29 vars:
30 work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
31 gather_facts: False
32 become: yes
33 roles:
34 - build-images
35 tags:
36 - build-images
diff --git a/tools/gate/playbooks/osh-infra-collect-logs.yaml b/tools/gate/playbooks/osh-infra-collect-logs.yaml
new file mode 100644
index 0000000..f08f706
--- /dev/null
+++ b/tools/gate/playbooks/osh-infra-collect-logs.yaml
@@ -0,0 +1,30 @@
1# Copyright 2017 The Openstack-Helm Authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15- hosts: all
16 vars:
17 work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
18 logs_dir: "/tmp/logs"
19 roles:
20 - gather-host-logs
21 - helm-release-status
22 - describe-kubernetes-objects
23 - gather-pod-logs
24 - gather-prom-metrics
25 tags:
26 - gather-host-logs
27 - helm-release-status
28 - describe-kubernetes-objects
29 - gather-pod-logs
30 - gather-prom-metrics \ No newline at end of file
diff --git a/tools/gate/playbooks/osh-infra-deploy-docker.yaml b/tools/gate/playbooks/osh-infra-deploy-docker.yaml
new file mode 100644
index 0000000..4c54324
--- /dev/null
+++ b/tools/gate/playbooks/osh-infra-deploy-docker.yaml
@@ -0,0 +1,43 @@
1# Copyright 2017 The Openstack-Helm Authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15- hosts: all
16 vars_files:
17 - vars.yaml
18 vars:
19 work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
20 gather_facts: False
21 become: yes
22 roles:
23 - deploy-python
24 tags:
25 - deploy-python
26
27- hosts: all
28 vars_files:
29 - vars.yaml
30 vars:
31 work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
32 gather_facts: True
33 become: yes
34 roles:
35 - setup-firewall
36 - deploy-python-pip
37 - deploy-docker
38 - deploy-yq
39 tags:
40 - setup-firewall
41 - deploy-python-pip
42 - deploy-docker
43 - deploy-yq
diff --git a/tools/gate/playbooks/osh-infra-deploy-k8s.yaml b/tools/gate/playbooks/osh-infra-deploy-k8s.yaml
new file mode 100644
index 0000000..5dc2dde
--- /dev/null
+++ b/tools/gate/playbooks/osh-infra-deploy-k8s.yaml
@@ -0,0 +1,36 @@
1# Copyright 2017 The Openstack-Helm Authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15- hosts: primary
16 vars_files:
17 - vars.yaml
18 vars:
19 work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
20 gather_facts: True
21 roles:
22 - build-helm-packages
23 - deploy-kubeadm-aio-master
24 tags:
25 - build-helm-packages
26 - deploy-kubeadm-aio-master
27
28- hosts: nodes
29 vars_files:
30 - vars.yaml
31 vars:
32 work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
33 roles:
34 - deploy-kubeadm-aio-node
35 tags:
36 - deploy-kubeadm-aio-node \ No newline at end of file
diff --git a/tools/gate/playbooks/osh-infra-upgrade-host.yaml b/tools/gate/playbooks/osh-infra-upgrade-host.yaml
new file mode 100644
index 0000000..495b5cb
--- /dev/null
+++ b/tools/gate/playbooks/osh-infra-upgrade-host.yaml
@@ -0,0 +1,41 @@
1# Copyright 2017 The Openstack-Helm Authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15- hosts: all
16 vars_files:
17 - vars.yaml
18 vars:
19 work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
20 gather_facts: False
21 become: yes
22 roles:
23 - deploy-python
24 tags:
25 - deploy-python
26
27- hosts: all
28 vars_files:
29 - vars.yaml
30 vars:
31 work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
32 gather_facts: True
33 become: yes
34 roles:
35 - upgrade-host
36 - start-zuul-console
37 - disable-local-nameserver
38 tags:
39 - upgrade-host
40 - start-zuul-console
41 - disable-local-nameserver
diff --git a/tools/gate/playbooks/vars.yaml b/tools/gate/playbooks/vars.yaml
new file mode 100644
index 0000000..eb6ffae
--- /dev/null
+++ b/tools/gate/playbooks/vars.yaml
@@ -0,0 +1,15 @@
1# Copyright 2017 The Openstack-Helm Authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15null: null
diff --git a/tools/gate/playbooks/zuul-linter.yaml b/tools/gate/playbooks/zuul-linter.yaml
new file mode 100644
index 0000000..7b6fb37
--- /dev/null
+++ b/tools/gate/playbooks/zuul-linter.yaml
@@ -0,0 +1,20 @@
1# Copyright 2017 The Openstack-Helm Authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15- hosts: primary
16 tasks:
17 - name: Execute a Whitespace Linter check
18 command: find . -not -path "*/\.*" -not -path "*/doc/build/*" -not -name "*.tgz" -type f -exec egrep -l " +$" {} \;
19 register: result
20 failed_when: result.stdout != "" \ No newline at end of file
diff --git a/tools/gate/scripts/010-build-charts.sh b/tools/gate/scripts/010-build-charts.sh
new file mode 100755
index 0000000..878f54a
--- /dev/null
+++ b/tools/gate/scripts/010-build-charts.sh
@@ -0,0 +1,19 @@
1#!/bin/bash
2
3# Copyright 2017 The Openstack-Helm Authors.
4#
5# Licensed under the Apache License, Version 2.0 (the "License"); you may
6# not use this file except in compliance with the License. You may obtain
7# a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14# License for the specific language governing permissions and limitations
15# under the License.
16
17set -xe
18
19make charts