[zuul] Zuul gates fixes

Add firewall flush rules to zuul pre-update gates.
Wrap gate scripts by run-gates.sh script in order to preserve the scripts execution contexts.
Altered build-charts script.

Change-Id: I6295d55338a6a75ac43b54c092704670d61854d9
This commit is contained in:
Markin, Sergiy (sm515x) 2022-09-29 16:05:06 +00:00
parent 229bbe75b0
commit 556a837756
5 changed files with 77 additions and 4 deletions

View File

@ -74,10 +74,7 @@
zuul_osh_infra_relative_path: ../../openstack/openstack-helm-infra/
gate_scripts_relative_path: ""
gate_scripts:
- "{{ zuul_osh_infra_relative_path }}./tools/deployment/apparmor/001-setup-apparmor-profiles.sh"
- "{{ zuul_osh_infra_relative_path }}./tools/deployment/common/005-deploy-k8s.sh"
- ./tools/gate/scripts/010-build-charts.sh
- sudo ./tools/gate/scripts/020-test-divingbell.sh
- ./tools/gate/scripts/run-gates.sh
post-run: tools/gate/playbooks/osh-infra-collect-logs.yaml
required-projects:
- openstack/openstack-helm-infra

View File

@ -35,10 +35,12 @@
- upgrade-host
- start-zuul-console
- disable-local-nameserver
- setup-firewall
tags:
- upgrade-host
- start-zuul-console
- disable-local-nameserver
- setup-firewall
- hosts: all
vars_files:

View File

@ -0,0 +1,29 @@
# 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.
# NOTE(portdirect): This needs refinement but drops the firewall on zuul nodes
---
- name: deploy iptables packages
include_role:
name: deploy-package
tasks_from: dist
vars:
packages:
deb:
- iptables
rpm:
- iptables
- command: iptables -S
- command: iptables -F
- command: iptables -P INPUT ACCEPT
- command: iptables -S
...

View File

@ -0,0 +1,21 @@
#!/bin/bash
CURRENT_DIR="$(pwd)"
: "${PORTHOLE_PATH:="../porthole"}"
cd "${PORTHOLE_PATH}" || exit
sudo echo 127.0.0.1 localhost /etc/hosts
BUILD_DIR=$(mktemp -d)
HELM=${BUILD_DIR}/helm
HELM_PIDFILE=${CURRENT_DIR}/.helm-pid
rm -rf build
rm -f charts/*.tgz
rm -f charts/*/requirements.lock
rm -rf charts/*/charts
./tools/helm_install.sh ${HELM}
./tools/helm_tk.sh ${HELM} ${HELM_PIDFILE}

24
tools/gate/scripts/run-gates.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
# 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.
set -xe
./tools/gate/scripts/002-build-helm-toolkit.sh
../../openstack/openstack-helm-infra/tools/deployment/apparmor/001-setup-apparmor-profiles.sh
../../openstack/openstack-helm-infra//tools/deployment/common/005-deploy-k8s.sh
./tools/gate/scripts/010-build-charts.sh
sudo ./tools/gate/scripts/020-test-divingbell.sh