diff --git a/.zuul.yaml b/.zuul.yaml index 45ca723b..3e152cf0 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -56,16 +56,13 @@ - zuul: openstack/openstack-helm-infra vars: zuul_osh_infra_relative_path: ../openstack-helm-infra/ - timeout: 3600 + timeout: 7200 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-shipyard-check.yaml post-run: tools/gate/playbooks/osh-infra-collect-logs.yaml required-projects: - openstack/openstack-helm-infra + nodeset: airship-shipyard-single-node irrelevant-files: - ^.*\.rst$ - ^doc/.*$ @@ -74,7 +71,8 @@ - job: name: airship-shipyard-ubuntu parent: airship-shipyard-base - nodeset: airship-shipyard-single-node + run: tools/gate/playbooks/airship-shipyard-check.yaml + - job: name: airship-shipyard-tox-base diff --git a/tools/gate/playbooks/airship-shipyard-check.yaml b/tools/gate/playbooks/airship-shipyard-check.yaml index 89cbd90d..406541c3 100644 --- a/tools/gate/playbooks/airship-shipyard-check.yaml +++ b/tools/gate/playbooks/airship-shipyard-check.yaml @@ -14,9 +14,18 @@ - hosts: primary tasks: + - name: Setup environment + shell: | + set -xe; + ./tools/gate/scripts/000-environment-setup.sh + environment: + OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('') }}" + args: + chdir: "{{ zuul_shipyard_relative_path | default(zuul.project.src_dir) }}" + - name: Build Charts shell: | set -xe; ./tools/gate/scripts/010-build-charts.sh args: - chdir: "{{ zuul_osh_relative_path | default(zuul.project.src_dir) }}" + chdir: "{{ zuul_shipyard_relative_path | default(zuul.project.src_dir) }}" diff --git a/tools/gate/playbooks/osh-infra-deploy-k8s.yaml b/tools/gate/playbooks/osh-infra-deploy-k8s.yaml index 5dc2ddeb..c6d630ad 100644 --- a/tools/gate/playbooks/osh-infra-deploy-k8s.yaml +++ b/tools/gate/playbooks/osh-infra-deploy-k8s.yaml @@ -33,4 +33,4 @@ roles: - deploy-kubeadm-aio-node tags: - - deploy-kubeadm-aio-node \ No newline at end of file + - deploy-kubeadm-aio-node diff --git a/tools/gate/scripts/000-environment-setup.sh b/tools/gate/scripts/000-environment-setup.sh new file mode 100755 index 00000000..f1160d8f --- /dev/null +++ b/tools/gate/scripts/000-environment-setup.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# 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. + +set -xe + +sudo apt-get update +sudo apt-get install --no-install-recommends -y \ + ca-certificates \ + git \ + make \ + jq \ + nmap \ + curl \ + uuid-runtime + +CURRENT_DIR="$(pwd)" +: ${OSH_INFRA_PATH:="../openstack-helm-infra"} +cd ${OSH_INFRA_PATH} +make dev-deploy setup-host +make dev-deploy k8s +cd ${CURRENT_DIR}