From 70e4f247323bfff6c672e32848db42fe700d03f3 Mon Sep 17 00:00:00 2001 From: Felipe Monteiro Date: Mon, 2 Jul 2018 21:24:33 -0400 Subject: [PATCH] Combine integration and airship-deckhand-ubuntu jobs together To cut down on Zuul nodes, this patchset combines the integration docker job with the airship-deckhand-ubuntu job together, because the former essentially subsumes the latter: integration docker job sets up the host, deploys docker, deploys k8s, generates the Deckhand chart using Helm, builds the Deckhand image using Docker, deploys Deckhand, PostgreSQL and other Keystone/Barbican dependencies using OSH, then finally runs integration tests against the deployment. This, then, validates everything that airship-deckhand-ubuntu did deployment-wise. Also, this patchset switches the 2 uwsgi jobs over to voting: false as the Docker jobs are already voting. Change-Id: I10b15f5a45a32413dc904ee32bdbbb4e9cdf98a2 --- .zuul.yaml | 35 ++----------------- .../run-integration-tests-docker.yaml | 2 ++ .../build-charts/tasks/build-charts.yaml} | 17 +++++---- tools/gate/roles/build-charts/tasks/main.yaml | 15 ++++++++ 4 files changed, 28 insertions(+), 41 deletions(-) rename tools/gate/{playbooks/airship-deckhand-check.yaml => roles/build-charts/tasks/build-charts.yaml} (67%) create mode 100644 tools/gate/roles/build-charts/tasks/main.yaml diff --git a/.zuul.yaml b/.zuul.yaml index ee489bd6..b79247e7 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -17,11 +17,11 @@ jobs: - airship-deckhand-tox-py27-postgresql - airship-deckhand-tox-py35-postgresql - - airship-deckhand-ubuntu: + - airship-deckhand-functional-uwsgi-py35: voting: false - - airship-deckhand-functional-uwsgi-py35 - airship-deckhand-functional-docker-py35 - - airship-deckhand-integration-uwsgi-py35 + - airship-deckhand-integration-uwsgi-py35: + voting: false - airship-deckhand-integration-docker-py35 - airship-deckhand-docker-build-gate gate: @@ -58,35 +58,6 @@ vars: tox_envlist: py35-postgresql -- job: - name: airship-deckhand-base - roles: - - zuul: openstack/openstack-helm-infra - vars: - zuul_osh_infra_relative_path: ../openstack-helm-infra/ - timeout: 3600 - pre-run: - - tools/gate/playbooks/osh-infra-upgrade-host.yaml - - tools/gate/playbooks/osh-infra-deploy-docker.yaml - - tools/gate/playbooks/osh-infra-build.yaml - - tools/gate/playbooks/osh-infra-deploy-k8s.yaml - run: tools/gate/playbooks/airship-deckhand-check.yaml - post-run: tools/gate/playbooks/osh-infra-collect-logs.yaml - required-projects: - - openstack/openstack-helm-infra - -- job: - name: airship-deckhand-ubuntu - parent: airship-deckhand-base - nodeset: openstack-helm-single-node - irrelevant-files: - - ^.*\.rst$ - - ^doc/.*$ - - ^etc/.*$ - - ^releasenotes/.*$ - - ^setup.cfg$ - - ^deckhand/tests/unit/.*$ - - job: name: airship-deckhand-functional-uwsgi-py35 description: | diff --git a/tools/gate/playbooks/run-integration-tests-docker.yaml b/tools/gate/playbooks/run-integration-tests-docker.yaml index 65a8a0f5..1044ad0d 100644 --- a/tools/gate/playbooks/run-integration-tests-docker.yaml +++ b/tools/gate/playbooks/run-integration-tests-docker.yaml @@ -16,6 +16,7 @@ roles: - build-images - deploy-keystone-dependencies + - build-charts - deploy-barbican # NOTE: deploy-postgresql and deploy-deckhand must follow # deploy-keystone-dependencies which restarts Docker, causing @@ -27,6 +28,7 @@ tags: - build-images - deploy-keystone-dependencies + - build-charts - deploy-barbican - deploy-postgresql - generate-test-config diff --git a/tools/gate/playbooks/airship-deckhand-check.yaml b/tools/gate/roles/build-charts/tasks/build-charts.yaml similarity index 67% rename from tools/gate/playbooks/airship-deckhand-check.yaml rename to tools/gate/roles/build-charts/tasks/build-charts.yaml index 89cbd90d..6df762a9 100644 --- a/tools/gate/playbooks/airship-deckhand-check.yaml +++ b/tools/gate/roles/build-charts/tasks/build-charts.yaml @@ -1,4 +1,4 @@ -# Copyright 2017 The Openstack-Helm Authors. +# Copyright 2018 AT&T Intellectual Property. All other rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,11 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -- hosts: primary - tasks: - - name: Build Charts - shell: | - set -xe; - ./tools/gate/scripts/010-build-charts.sh - args: - chdir: "{{ zuul_osh_relative_path | default(zuul.project.src_dir) }}" +- name: Build Helm Charts + when: disable_keystone == false + shell: | + set -xe; + ./tools/gate/scripts/010-build-charts.sh + args: + chdir: "{{ zuul.project.src_dir }}" diff --git a/tools/gate/roles/build-charts/tasks/main.yaml b/tools/gate/roles/build-charts/tasks/main.yaml new file mode 100644 index 00000000..153664c6 --- /dev/null +++ b/tools/gate/roles/build-charts/tasks/main.yaml @@ -0,0 +1,15 @@ +# Copyright 2018 AT&T Intellectual Property. All other rights reserved. +# +# 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. + +- include: build-charts.yaml