Browse Source

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>
Pete Birley 11 months ago
parent
commit
00927b2383

+ 58
- 0
.zuul.yaml View File

@@ -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

+ 22
- 0
tools/gate/playbooks/airship-divingbell-check.yaml View File

@@ -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) }}"

+ 36
- 0
tools/gate/playbooks/osh-infra-build.yaml View File

@@ -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

+ 30
- 0
tools/gate/playbooks/osh-infra-collect-logs.yaml View File

@@ -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

+ 43
- 0
tools/gate/playbooks/osh-infra-deploy-docker.yaml View File

@@ -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

+ 36
- 0
tools/gate/playbooks/osh-infra-deploy-k8s.yaml View File

@@ -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

+ 41
- 0
tools/gate/playbooks/osh-infra-upgrade-host.yaml View File

@@ -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

+ 15
- 0
tools/gate/playbooks/vars.yaml View File

@@ -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
+
15
+null: null

+ 20
- 0
tools/gate/playbooks/zuul-linter.yaml View File

@@ -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 != ""

+ 19
- 0
tools/gate/scripts/010-build-charts.sh View File

@@ -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
+
17
+set -xe
18
+
19
+make charts

Loading…
Cancel
Save